alarm-panel
Alarm-panel cap.
Alarm-panel cap. Models HA alarm_control_panel.* on DeviceType.AlarmPanel. State follows HA's canonical lifecycle across disarmed / armed_(home|away|night|vacation|custom_bypass) / arming / pending / triggered / disarming.
Many panels require a PIN code on arm / disarm — the optional code field on the methods passes it through to the upstream service; it's NEVER persisted in the runtime slice or any event payload. Whether a code is required is the slice's codeRequired (#459): null when the provider cannot tell.
availableModes mirrors HA's supported_features-derived arm mode list — the UI renders only the buttons the panel accepts.
At a glance
| Capability | alarm-panel |
| Provided by | The device's own driver provides it: each device registers its own provider. |
| Active providers per device | one |
| Device types | alarm-panel |
| Source | packages/types/src/capabilities/alarm-panel.cap.ts |
Methods
Every method takes the device id (deviceId) to address the device; the input tables below list the other fields.
| Method | Kind | Required of a provider | Access |
|---|---|---|---|
trigger | mutation | yes | protected |
disarm | mutation | yes | protected |
arm | mutation | yes | protected |
trigger
mutation
Force the panel into the triggered state — used by HA automations to surface external sensor events through the panel (e.g. a Reolink camera intrusion event firing the security system). Provider rejects when the panel hardware doesn't support a software-initiated trigger.
Input
No fields besides deviceId.
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
alarm.trigger | Trigger alarm |
disarm
mutation
Input
| Field | Type | Required | Description |
|---|---|---|---|
code | string | no |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
alarm.disarm | Disarm | state = "disarmed" |
arm
mutation
Input
| Field | Type | Required | Description |
|---|---|---|---|
mode | "home" | "away" | "night" | "vacation" | "custom_bypass" | yes | |
code | string | no | Optional PIN code. Required when codeRequired === true. Passed through to the upstream service; never persisted. |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
alarm.arm.home | Arm home | state = "armed_home" |
alarm.arm.away | Arm away | state = "armed_away" |
alarm.arm.night | Arm night | state = "armed_night" |
alarm.arm.vacation | Arm vacation | state = "armed_vacation" |
alarm.arm.custom_bypass | Arm custom bypass | state = "armed_custom_bypass" |
Runtime state
The state Dominevo keeps for each device with this capability, readable without calling the provider.
Runtime-state slice — mirrored by the kernel. UI panel reads the full slice; renders an arm button per availableModes entry and a PIN field iff codeRequired === true.
| Field | Type | Required | Description |
|---|---|---|---|
state | "disarmed" | "armed_home" | "armed_away" | "armed_night" | "armed_vacation" | "armed_custom_bypass" | "arming" | "disarming" | "pending" | "triggered" | yes | Current lifecycle state. |
targetMode | "home" | "away" | "night" | "vacation" | "custom_bypass" | null | no | The arm mode the machine belongs to under transitional words (arming / pending / triggered / disarming). null when disarmed or when a provider cannot name one. .optional() so a restored pre-field slice still parses; exporters treat absent the same as null (no remembered mode). |
availableModes | ("home" | "away" | "night" | "vacation" | "custom_bypass")[] | yes | Subset of arm modes the panel accepts. UI renders one button per mode in this list. |
codeRequired | boolean | null | yes | Whether the panel requires a PIN on arm / disarm (#459; the field was requiresCode, and the alarm-pin-required device feature is gone). null = the provider cannot tell, never false. A slice restored from before the rename is upgraded at boot by restoredFieldRenames. |
lastChangedAt | number | yes | Ms epoch when the slice was last updated. |