removeRule(params: IRemoveRule)

Requires:
@ray-js/ray≥1.7.60

Description

Remove scene rules under the related button conditions

Parameters

ParameterTypeRequiredDescription
YesParameters for removing rules

Return Value

Type: Promise<boolean>
Whether deletion succeeded

Referenced Types

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

Examples

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('Removal result:', success);
  } catch (err) {
    console.error('Removal failed:', err);
  }
};