SmartAlarmAbility.setBuiltInAlarmStatus(options: SetBuiltInAlarmStatusParams)

Requires:
@ray-js/panel-sdk≥1.8.0

Description

Enable or disable the device’s built-in alert rules

Parameters

ParameterTypeRequiredDescription
YesOperation parameters

Return Value

Type: Promise<SetBuiltInAlarmStatusResult>
Tuple [whether the operation succeeded, updated built-in alert list]

Referenced Types

typeSetBuiltInAlarmStatusResult
[boolean, BuiltInAlarmList]
typeBuiltInAlarmList
export type BuiltInAlarmList = BuiltInAlarmRule[];
typeBuiltInAlarmRule
PropertyTypeDescription
auditStatusnumberReview status
boundForPanelbooleanWhether it is bound to a scene panel
boundForWiFiPanelbooleanWhether it is bound to a WiFi scene panel
enabledbooleanWhether enabled
Multilingual data body
idstringRule ID
localLinkagebooleanWhether it is a local linkage
namestringRule name
newLocalScenebooleanWhether it is an App-controlled local linkage
stickyOnTopbooleanWhether to display the scene on the home page
typeBuiltInAlarmI18nData
PropertyTypeDescription
Multilingual name
Multilingual content
typeAlarmLocaleText
PropertyTypeDescription
enstringEnglish text
zhstringChinese text

Examples

Example

const [success, updatedList] = await sdm.alarm.setBuiltInAlarmStatus({
  disabled: false,
  ruleIds: 'rule_001,rule_002',
});
console.log('Result:', success, 'Updated list:', updatedList);