Commit 2bca428e07e4c2872ab00113326a381c9479b4d7

Authored by ww
1 parent f2af135d

perf: deviceProfileId is used to query device attributes

... ... @@ -32,7 +32,7 @@
32 32 }
33 33
34 34 const props = defineProps<{
35   - deviceDetail: Record<'tbDeviceId' | 'profileId' | 'id', string>;
  35 + deviceDetail: Record<'tbDeviceId' | 'profileId' | 'id' | 'deviceProfileId', string>;
36 36 }>();
37 37
38 38 const grid = {
... ... @@ -137,8 +137,8 @@
137 137
138 138 const { send, close, data } = useWebSocket(socketInfo.origin, {
139 139 async onConnected() {
140   - const { id, profileId } = props.deviceDetail;
141   - const value = await getDeviceAttrs(profileId, id);
  140 + const { id, deviceProfileId } = props.deviceDetail;
  141 + const value = await getDeviceAttrs(deviceProfileId, id);
142 142 socketInfo.attrKeys = value;
143 143 send(JSON.stringify(unref(getSendValue)));
144 144 },
... ...