---
name: "offDpDataChange"
mode: "kit"
versionRequirements:
  - { name: "DeviceKit", version: "1.2.7" }
  - { name: "@ray-js/ray", version: "0.6.23" }
platform:
  - "iOS"
  - "Android"
async: true
title: "offDpDataChange - 移除监听：dp 点变更"
---

## offDpDataChange

> [VERSION] DeviceKit >= 1.2.7 | @ray-js/ray >= 0.6.23

> [PLATFORM] iOS, Android

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

### 描述

dp点变更

### 参数

`(listener: Function)`

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

### 引用对象

##### `interface` DpsChanged

| 属性 | 类型 | 最低版本 | 描述 |
| --- | --- | --- | --- |
| `deviceId` | `string` | `1.2.6` | dps 对应的设备 id |
| `gwId` | `string` | `1.2.6` | 子设备对应的网关设备 id，可以根据此进行网关面板的状态刷新 |
| `dps` | `Record<string, Record<string, any>>` | `1.2.6` | dps 变化的数据 |
| `dpsTime` | `Record<string, number>` | `4.11.0` | dpsTime dp变化的时间戳（可能为空） |
| `options` | `Record<string, Record<string, any>>` | `1.2.6` | options 预留的标记位，后续可以区分来源等 |


### 示例代码

#### 基础调用

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

const { offDpDataChange } = device;

offDpDataChange((result) => {
  console.log('offDpDataChange', result);
});
```
