SmartGroupModel.onDeviceInfoUpdated(listener: Function)
Requires:
@ray-js/panel-sdk≥1.5.0
Description
Listen for smart group device info change events
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
listener | (data: DeviceInfoChanged) => number | Yes | Event callback that receives parameters containing device info changes and related data |
Return Value
Type: number
Listener ID, used to cancel via offDeviceInfoUpdated
Referenced Types
type
DeviceInfoChangedDevice info change event callback parameters| Property | Type | Required | Description |
|---|---|---|---|
deviceId | string | Yes | Device ID |
| No | Changed DP data (may be empty) |
type
DpStateDatapoint status object, where the key is the datapoint code and the value is the datapoint value.type
DpValueDatapoint value type, which can be boolean, number, or string.