---
name: "SmartAlarmAbility.setBuiltInAlarmStatus"
mode: "api"
versionRequirements:
  - { name: "@ray-js/panel-sdk", version: "1.8.0" }
title: "setBuiltInAlarmStatus"
---

## SmartAlarmAbility.setBuiltInAlarmStatus

> [VERSION] @ray-js/panel-sdk >= 1.8.0

> 💡 Supports single devices only; group environments are not supported. Note: The response example is for reference only and includes fields beyond the defined response parameters. Do not use any data other than the parameters defined here; otherwise, it may cause application errors.

### Description

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

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `options` | `SetBuiltInAlarmStatusParams` | Yes | Operation parameters |

### Return Value

Type: `Promise<SetBuiltInAlarmStatusResult>`

Tuple [whether the operation succeeded, updated built-in alert list]

### Referenced Types

##### `type` SetBuiltInAlarmStatusParams

| Property | Type | Description |
| --- | --- | --- |
| `devId` | `string` | Device ID; if not provided, use the current device |
| `disabled` | `boolean` | true disables, false enables |
| `ruleIds` | `string` | Alarm rule IDs to operate on; multiple values separated by commas |

##### `type` SetBuiltInAlarmStatusResult

```typescript
[boolean, BuiltInAlarmList]
```

##### `type` BuiltInAlarmList

```typescript
export type BuiltInAlarmList = BuiltInAlarmRule[];
```

##### `type` BuiltInAlarmRule

| Property | Type | Description |
| --- | --- | --- |
| `auditStatus` | `number` | Review status |
| `boundForPanel` | `boolean` | Whether it is bound to a scene panel |
| `boundForWiFiPanel` | `boolean` | Whether it is bound to a WiFi scene panel |
| `enabled` | `boolean` | Whether enabled |
| `i18nData` | `BuiltInAlarmI18nData` | Multilingual data body |
| `id` | `string` | Rule ID |
| `localLinkage` | `boolean` | Whether it is a local linkage |
| `name` | `string` | Rule name |
| `newLocalScene` | `boolean` | Whether it is an App-controlled local linkage |
| `stickyOnTop` | `boolean` | Whether to display the scene on the home page |

##### `type` BuiltInAlarmI18nData

| Property | Type | Description |
| --- | --- | --- |
| `name` | `AlarmLocaleText` | Multilingual name |
| `content` | `AlarmLocaleText` | Multilingual content |

##### `type` AlarmLocaleText

| Property | Type | Description |
| --- | --- | --- |
| `en` | `string` | English text |
| `zh` | `string` | Chinese text |


### Examples

#### Example

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