getCommandCache(params: GetCommandCacheParams)

版本要求:
@tuya-miniapp/cloud-api≥1.0.5

描述

查询指定设备在云端缓存的待下发指令(DP 点集合)。支持 Wi-Fi、ZigBee 设备。

参数

参数类型必填说明
是请求体

返回值

类型:Promise<GetCommandCacheResult>
CommandCache 数组;元素字段见该类型注释

引用对象

typeGetCommandCacheResult
CommandCache[]

示例代码

请求示例

import { getCommandCache } from '@tuya-miniapp/cloud-api';

const result = await getCommandCache({
  devId: 'your_device_id',
});

返回示例

[
  {
    "dps": {
      "switch_1": true
    },
    "pushStatus": false
  },
  {
    "dps": {
      "switch_2": true
    },
    "pushStatus": true
  }
]