---
name: "getDevAlarmList"
mode: "api"
versionRequirements:
  - { name: "@ray-js/ray", version: "1.5.2" }
title: "getDevAlarmList - Get Device Alarm List"
---

## getDevAlarmList

> [VERSION] @ray-js/ray >= 1.5.2

### Description

Query the alarm list by device ID

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `devId` | `string` | Yes | Device ID |

### Return Value

Type: `Promise<AlarmList[]>`

Alarm rule list, including alarm ID, name, enabled status, binding info, etc.

##### AlarmList

| Property | Type | Description |
| --- | --- | --- |
| `auditStatus` | `number` | Review status |
| `boundForPanel` | `boolean` | Whether bound to a scene panel |
| `boundForWiFiPanel` | `boolean` | Whether bound to a Wi-Fi scene panel |
| `enabled` | `boolean` | Whether enabled |
| `i18nData` | `Object` | Multilingual data body |
| `id` | `string` | Rule ID |
| `iotAutoAlarm` | `boolean` | Whether it is an IoT automatic alarm |
| `isLogicRule` | `boolean` | Whether it is a logic rule |
| `localLinkage` | `boolean` | Whether it is a local automation |
| `name` | `string` | Rule name |
| `newLocalScene` | `boolean` | Whether it is an App-controlled local automation |
| `stickyOnTop` | `boolean` | Whether the scene is displayed on the home page |

##### AlarmList.i18nData properties

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | `Object` | Yes | - | Name |
| `content` | `Object` | Yes | - | Content |


##### AlarmList.i18nData.name properties

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `en` | `string` | Yes | - | English name |
| `zh` | `string` | Yes | - | Chinese name |


##### AlarmList.i18nData.content properties

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `en` | `string` | Yes | - | English content |
| `zh` | `string` | Yes | - | Chinese content |


### Examples

#### Basic usage

```ts
import { getDevAlarmList } from '@ray-js/ray';

getDevAlarmList('vdevo169477319679442').then((res) => {
  console.log('Alarm list:', res);
}).catch((error) => {
  console.error(error);
});
```
