updateTimer

版本要求:
DeviceKit≥1.2.6@ray-js/ray≥0.6.23
支持平台:
iOSAndroid
import { device } from '@ray-js/ray';

const { updateTimer } = device;

// Promise 调用
try {
  const res = await updateTimer({ ...params });
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

方法签名
updateTimer(params: )
SDK 最低版本
iOSThingSmartDeviceKitBizBundle
≥ 5.2.0
Androidcom.thingclips.smart:thingsmart-bizbundle-devicekit
≥ 5.2.0

描述

更新定时

参数

属性类型必填说明SDK 最低版本
deviceIdstring否deviceId 设备 id,deviceId 和 groupId 至少传一个—
groupIdstring否groupId 群组 id,deviceId 和 groupId 至少传一个—
是timer 更新定时模型—
complete() => void否接口调用结束的回调函数(调用成功、失败都会执行)—
success() => void否接口调用成功的回调函数—
fail(params: Object) => void否接口调用失败的回调函数—
fail 回调参数
属性类型说明
errorMsgstring错误信息
errorCodestring | number错误码
错误扩展

返回值

无

示例代码

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

device.updateTimer({
  deviceId: "vdevo177319884964790",
  timer: { timerId: "82818368", time: "18:38", loops: "0000000", dps: {20:0}, aliasName: "xx", isAppPush: false },
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});