@ledvance/base 1.2.41 → 1.2.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -31,7 +31,7 @@ interface DeviceEvent {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
interface TYInfoUpdateType {
|
|
34
|
-
devId: string
|
|
34
|
+
devId: string
|
|
35
35
|
online: boolean
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -58,13 +58,14 @@ export const addListener = (store) => {
|
|
|
58
58
|
})
|
|
59
59
|
|
|
60
60
|
groupFeatureListener = nativeEventEmitter.addListener('UAGroupFeatureUpdate', (event: GroupFeatureEvent) => {
|
|
61
|
-
|
|
61
|
+
const tyGroupId = Number(event.tyGroupId)
|
|
62
|
+
if (tyGroupId === store.getState().ldvModules.uaGroupInfo.tyGroupId) {
|
|
62
63
|
console.log('长链接刷新Group数据', event)
|
|
63
64
|
const nativeProps: NativeProps = {
|
|
64
65
|
familyName: '',
|
|
65
66
|
deviceInfo: {} as DeviceInfo,
|
|
66
67
|
uaGroupInfo: {
|
|
67
|
-
tyGroupId:
|
|
68
|
+
tyGroupId: tyGroupId,
|
|
68
69
|
pId: '',
|
|
69
70
|
config: JSON.parse(event.config),
|
|
70
71
|
dps: {},
|
|
@@ -99,4 +100,4 @@ export const removeListener = () => {
|
|
|
99
100
|
|
|
100
101
|
groupDeviceListener && groupDeviceListener.remove()
|
|
101
102
|
groupDeviceListener = null
|
|
102
|
-
}
|
|
103
|
+
}
|
|
@@ -101,7 +101,7 @@ const nativePropsSlice = createSlice({
|
|
|
101
101
|
state.uaGroupInfo.config = action.payload.uaGroupInfo.config
|
|
102
102
|
},
|
|
103
103
|
setGroupConfig: (state, action: PayloadAction<any>) => {
|
|
104
|
-
state.uaGroupInfo.config = action.payload
|
|
104
|
+
state.uaGroupInfo.config = { ...state.uaGroupInfo.config, ...action.payload }
|
|
105
105
|
},
|
|
106
106
|
setDps(state, action: PayloadAction<any>) {
|
|
107
107
|
const dpKeys = Object.keys(action.payload)
|
|
@@ -398,4 +398,4 @@ export {
|
|
|
398
398
|
useGroupDevices,
|
|
399
399
|
useSystemTimeFormate,
|
|
400
400
|
useEnergieverbrauch,
|
|
401
|
-
}
|
|
401
|
+
}
|