---
name: "onSubDeviceInfoUpdate"
mode: "kit"
versionRequirements:
  - { name: "DeviceKit", version: "3.1.2" }
  - { name: "@ray-js/ray", version: "0.8.0" }
platform:
  - "iOS"
  - "Android"
async: true
title: "onSubDeviceInfoUpdate - 网关子设备信息变化的事件"
---

## onSubDeviceInfoUpdate

> [VERSION] DeviceKit >= 3.1.2 | @ray-js/ray >= 0.8.0

> [PLATFORM] iOS, Android

> ⚡ **支持 Promise 调用** — 不传 success / fail / complete 回调时，该方法返回 Promise。

### 描述

网关子设备信息变化的事件

### 参数

`(listener: Function)`

| 参数 | 类型 | 必填 | 默认值 | 描述 |
| --- | --- | --- | --- | --- |
| `listener` | `(params: DeviceControlDevice) => void` | 是 | - |  |

### 引用对象

##### `interface` DeviceControlDevice

| 属性 | 类型 | 最低版本 | 描述 |
| --- | --- | --- | --- |
| `deviceId` | `string` | `4.11.0` | deviceId 设备id 支持跨面板获取其他的设备信息，当前面板可以传当前设备的 id 来进行获取 |
| `dps` | `Record<string, Record<string, any>>` | `4.11.0` | dps |


### 示例代码

#### 基础调用

```tsx
import { device } from '@ray-js/ray'

const { onSubDeviceInfoUpdate } = device;

onSubDeviceInfoUpdate((res) => {
  console.log('onSubDeviceInfoUpdate', res);
});
```
