Settings — Automation Rules
The Automation section lets administrators define event-driven rules that automatically execute device commands when specific system events occur. Each rule has a trigger event, optional run-if conditions, and one or more action commands to execute. Rules sourced from built-in modules are read-only; only custom module rules can be edited or deleted.
Page Layout
Standard two-column settings layout:
- Left — Rule List: searchable list; each row shows the rule name and an Enabled/Disabled chip. + button adds a new rule (requires
automation:create). - Right — Rule Detail Panel: appears when a rule is selected; shows properties and action buttons.
Add Automation Rule
Clicking + opens the Add Automation Rule dialog:
General
| Field | Description |
|---|---|
| Display Name | Required |
| Description | Required, multiline |
| Enabled | Checkbox; defaults to enabled |
Trigger Conditions
Select the Event Kind that triggers this rule (not all event kinds are available — internal system events, device commands, and object/scene lifecycle events are excluded). After choosing an event kind, optional Run-If Conditions appear.
Action Commands
Ordered list of commands to execute when the rule fires. Each command entry specifies:
- Command — from the system command registry
- Target — device picker, or auto-resolved from device type
- Parameters — command-specific values
Run-If Conditions
Conditions are ANDed together. Each criterion specifies:
- Property — an event field (e.g.
allowed,armState,tokenType) - Operator — equals, not-equals, includes, excludes, is-true, is-false, etc.
- Value — string, number, boolean, or array
Conditions are stored as a SQL-like expression (e.g. (allowed = true) and (token in ("abc","def"))).
Rule Detail Panel
| Property | Editable | Notes |
|---|---|---|
| Display Name, Enabled, Description | Yes (custom rules only) | automation:update required |
| Module | No | Shows the module identifier (e.g. custom) |
| Rule Body (JSON) | Yes (custom rules only) | Opens the Body edit dialog |
Action Buttons
| Button | Permission | Description |
|---|---|---|
| Enable Automation | automation:update |
Shown when rule is disabled; custom rules only |
| Disable Automation | automation:update |
Shown when rule is enabled; custom rules only |
| Delete Automation | automation:delete |
Requires confirmation; custom rules only |
Permissions
| Action | Permission |
|---|---|
| View automation rules | /settings/automation route |
| Add new rule | automation:create |
| Edit rule info or body | automation:update |
| Enable / disable rule | automation:update |
| Delete rule | automation:delete |