SmartAlarmAbility.getBuiltInAlarmList(devId?: string)

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

Description

Query the product’s built-in alarm list by device ID

Parameters

ParameterTypeRequiredDescription
devIdstringNoDevice ID; if omitted, the current device is used

Return Value

Type: Promise<BuiltInAlarmList>
Built-in alarm list

Referenced Types

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

Examples

Example

const alarmList = await sdm.alarm.getBuiltInAlarmList();
alarmList.forEach(alarm => {
  console.log(alarm.id, alarm.name, alarm.enabled);
});