Commit 2bca428e07e4c2872ab00113326a381c9479b4d7
1 parent
f2af135d
perf: deviceProfileId is used to query device attributes
Showing
1 changed file
with
3 additions
and
3 deletions
@@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
32 | } | 32 | } |
33 | 33 | ||
34 | const props = defineProps<{ | 34 | const props = defineProps<{ |
35 | - deviceDetail: Record<'tbDeviceId' | 'profileId' | 'id', string>; | 35 | + deviceDetail: Record<'tbDeviceId' | 'profileId' | 'id' | 'deviceProfileId', string>; |
36 | }>(); | 36 | }>(); |
37 | 37 | ||
38 | const grid = { | 38 | const grid = { |
@@ -137,8 +137,8 @@ | @@ -137,8 +137,8 @@ | ||
137 | 137 | ||
138 | const { send, close, data } = useWebSocket(socketInfo.origin, { | 138 | const { send, close, data } = useWebSocket(socketInfo.origin, { |
139 | async onConnected() { | 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 | socketInfo.attrKeys = value; | 142 | socketInfo.attrKeys = value; |
143 | send(JSON.stringify(unref(getSendValue))); | 143 | send(JSON.stringify(unref(getSendValue))); |
144 | }, | 144 | }, |