A rule says: When something happens, Only if some conditions hold, Then do things in order. Example: “turn the fan on when the room is above 28 °C for five minutes during working hours”. You write rules in the Rules card on a dashboard, in sentences, without drawing a flow. Each rule runs as a flow behind the scenes.
Add the card
- Open a dashboard in edit mode and add the Rules card.
- In its settings, lock it to a place (an asset or a device), or let it follow the page (for example a site page that shows one site at a time).
- Save the dashboard.
A card without a place says “This card is not about a place yet. Pick an asset or a device in its settings, or let it follow the page.” See Widgets.
The card shows:
- the place’s Auto / Manual switch (see Manual and Auto modes),
- the list of the place’s rules with their status,
- Commands: the commands you may send to the place’s devices from the card.
Home and scope
Every rule has one home: the asset or device of the card where you created it. A rule may only name devices in its home’s scope:
| Home | Scope |
|---|---|
| An asset (site, building, room, line …) | Every device placed under the asset or any asset below it. At most 2,000 devices; a bigger place is refused, so put the rule on a smaller place. |
| A device | The device itself. |
A row can name one device or every device of a device profile in the scope (shown as “Every profile in place“). A profile reference may stand for at most 200 devices. If the devices of a profile in the scope change later, the rule keeps working with the devices it was saved with until someone saves it again.
The rule list
Each rule shows its name, an On / Off switch, its status and its last run (“Last run when: text“, or “Has not run yet”). A rule with a time, date or sunrise/sunset trigger also shows Next when.
| Status | Meaning |
|---|---|
| Idle | Waiting for its trigger. |
| Waiting time | A run is in a wait step. |
| Running | A run is under way. |
| Stopped: Manual | The place is in Manual. |
| Paused by a guard | The automation engine paused its flow (for example for running too often). See Protections and failed messages. |
| Needs attention | A device it names was deleted. It is switched off until someone edits it. |
| Off | Switched off. |
The menu of a rule has Edit, Duplicate, History, Run now and Delete. Deleting asks first: “The rule stops for good. Its history stays in the activity log.”
Write a rule
- Click Add rule. The editor opens as New rule.
- Optionally pick Start from a ready rule: Turn something on when a value is high, Turn something off when a value is low, Tell people when a device stays offline, Do something at sunset, Turn something off after it has been on for a while or Do something every so often during working hours. The rule is filled in with sensible numbers; you pick the devices.
- Type a Name (at most 120 characters).
- Fill in the blocks:
- When: “Any of these starts the rule.” Up to 10 triggers. See Triggers.
- Only if: “All of these must hold.” Optional. See Conditions.
- Then: “In this order.” Up to 20 actions. See Actions.
- Options: what happens when it fires while it is still running, and Also runs in Manual. See Actions.
- Click Test now to check it against the values stored now (below).
- Click Save rule.
Problems are listed under “Fix these before saving”, each beside its row, for example “Type the value to compare with.” or “Sunrise and sunset need the place’s location: set it on the place first.”
Confirmation for rules that act
A rule that sends commands, changes settings or notifies people asks once: “This rule acts on its own. Saving it lets the rule send commands, change settings or notify people by itself.” Tick Yes, let this rule act on its own to save. Saving is also refused if you yourself may not send one of its commands.
Test now
Test now runs the rule against the values stored now and sends nothing. The Result shows:
- each trigger: Holds now, Does not hold, or Starts by itself (time-based triggers),
- the rule: Would run now, Would not run or Manual would stop it, with the reason in words (for example “Room 1 · temperature is 26.4, not above 28”),
- It would: the actions it would take.
Run now and History
- Run now starts the rule at once, skipping its triggers. Its conditions still apply. If its first step moves equipment, it asks “Run name now? It moves equipment at once.” A rule whose only trigger is Only when I press Run now runs only this way.
- History shows the latest runs, newest first: when, Done or Failed, and a line in words. The last 30 runs are kept.
Permissions
| Action | Permission | Default role |
|---|---|---|
| See rules and their runs | View the rules of places and devices and their runs | User |
| Run a rule now | Run a rule now | User |
| Switch Manual / Auto | Switch a place between Manual and Auto | User |
| Add, change, switch on or off and delete rules | Add, change, switch on or off and delete rules | Admin |
Editing also needs access to the home asset or device. Creating, changing, switching and running rules, and every mode switch, are audited.
When a device is deleted
A rule that names a deleted device goes to Needs attention and is switched off. People are told (“Rule name needs attention”) and the webhook event rules.needs_attention is sent. Edit the rule, pick another device and save. A delete is never blocked by a rule.
Rules and flows
A rule’s flow appears in Automation with a Rules badge and opens read-only, with the hint to edit it in the Rules card. If you need more than a rule can do, use Detach into an ordinary flow in the flow editor. This cannot be undone: the rule is deleted and the flow becomes an ordinary flow that you edit in the flow editor.
Rules do not count against your plan’s flow limit.
Limits
| Limit | Value |
|---|---|
| Triggers per rule | 10 |
| Conditions per group | 16 |
| Nesting of condition groups | 4 levels |
| Actions per rule (including those inside choices) | 20 |
| Branches of one choice | 5 |
| Nesting of choices | 2 levels |
| Devices one row acts on | 200 |
| Devices in a home’s scope | 2,000 |
| Longest wait, wait-until or “stays so for” | 24 hours |
| Runs at the same time or queued (At most) | 1 to 10 |
| Run history kept | 30 runs |
| Formula | 500 characters, 12 values |
| Notify recipients | 20 |
| Notify message | 1,000 characters |

