---
name: "onSubDeviceInfoUpdate"
mode: "kit"
versionRequirements:
  - { name: "DeviceKit", version: "3.1.2" }
  - { name: "@ray-js/ray", version: "0.8.0" }
platform:
  - "iOS"
  - "Android"
async: true
---

## onSubDeviceInfoUpdate

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

> [PLATFORM] iOS, Android

> ⚡ **Supports Promise** — Returns a Promise when success / fail / complete callbacks are omitted.

### Description

Gateway sub-device info change event

### Parameters

`(listener: Function)`

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `listener` | `(params: DeviceControlDevice) => void` | Yes | - |  |

### Referenced Types

##### `interface` DeviceControlDevice

| Property | Type | Since | Description |
| --- | --- | --- | --- |
| `deviceId` | `string` | `4.11.0` | deviceId device ID Supports cross-panel retrieval of other device information; the current panel can pass the current device ID to get it |
| `dps` | `Record<string, Record<string, any>>` | `4.11.0` | dps |


### Examples

#### Basic usage

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

const { onSubDeviceInfoUpdate } = device;

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