removeRule(params: IRemoveRule)

版本要求:
@ray-js/ray≥1.7.60

描述

移除相关按键条件下的场景规则

参数

参数类型必填说明
是移除规则参数

返回值

类型:Promise<boolean>
是否删除成功

引用对象

typeAssociativeEntityId
type AssociativeEntityId = string;
typeAssociativeEntityValue
type AssociativeEntityValue = string;

示例代码

import { removeRule } from '@ray-js/ray';

const removeSceneRule = async () => {
  try {
    const success = await removeRule({
      bizDomain: 'wirelessSwitch',
      devId: 'device_001',
      associativeEntityId: '1',
      associativeEntityValue: 'rule_001',
      gid: '12345678',
    });
    console.log('移除结果:', success);
  } catch (err) {
    console.error('移除失败:', err);
  }
};