The Then block lists what a rule does, “In this order”. A rule has 1 to 20 actions, counting the actions inside choices. Click Add an action, choose the kind, and use Move up / Move down to order them.
| Kind | Does |
|---|---|
| Send a command | Sends a command from the device profile’s catalog. |
| Change a setting | Writes one setting to the device. |
| Tell people | Sends a notification. |
| Raise or clear an alarm | Opens or clears an alarm with the normal lifecycle. |
| Wait | Pauses before the next step. |
| Wait until something holds | Pauses until a condition holds, with a time limit. |
| Choose by a condition | Runs different steps depending on conditions. |
| Switch or start another rule | Switches another rule of the place on or off, or starts it. |
Send a command
Pick the Device (one device or every device of a profile) and a Command from the profile’s catalog, then its parameters. Saving checks that the command exists for every device it reaches and that its values fit (“This device type has no such command.”, “The command’s values do not fit it.”). Saving is refused if you may not send that command yourself (commands have tiers with their own permissions).
The command goes out like any other command, with its timeout and history on the device’s commands. A device in Manual is skipped: “skipped: device is in Manual”. See Sending commands to devices.
Change a setting
Pick the Device, type the Setting (a key, up to 128 characters) and the value after to. A value that looks like a number is sent as a number, anything else as text.
The setting is written as a shared attribute of each device, so the device receives it like any shared attribute it subscribes to. A device in Manual is skipped. See Attributes.
Tell people
| Field | Meaning |
|---|---|
| Who | Tick Owners, Admins and/or Members (the roles of your organisation). |
| Message | The text, up to 1,000 characters. |
The notification’s title is the rule’s name. It reaches each person through the channels they allow. The card offers roles; the rules API also accepts single users and teams, up to 20 recipients. A role with more than 20 active members is refused rather than half-told. Repeats of the same notice to the same person are held back for a cooldown, 10 minutes unless your plan sets another. Details: Notifications from rules and flows.
Raise or clear an alarm
| Field | Meaning |
|---|---|
| Raise / Clear | Open or update an alarm, or clear it. |
| Device | One device, every device of a profile, or (on a device card) on this place. |
| Alarm type | The type, for example pump_dry_run. |
| Severity | For Raise: Critical, Major, Minor, Warning or Info (default Warning). |
These alarms behave like rule alarms: one active alarm per device and type, the same notifications, throttle and storm guard. A raised alarm stays open until a Clear action, a flow or a person clears it; it has no condition of its own.
Wait
Wait for a number of seconds or minutes, 1 second to 24 hours. After the wait, the rule checks the place is still in Auto (“Still in Auto?”); if the place went to Manual meanwhile, the run stops there.
Wait until something holds
A condition (any kind from Conditions), for at most a time (1 second to 24 hours, default 10 minutes), and what to do on time-out: then go on or then stop.
The condition is checked again every 5 seconds against the stored values. When it holds, the run goes on at once. Unlike “stays so for”, a waiting run does not survive a platform restart.
Choose by a condition
Up to 5 branches, each If a condition then some actions, and an optional Otherwise. The first branch whose condition holds runs; if none holds, Otherwise runs. Choices can contain choices, 2 levels deep. The actions inside count toward the 20.
Switch or start another rule
Pick a Rule of the same place and:
| Choice | Does |
|---|---|
| Switch on / Switch off | Turns that rule on or off, as its switch would. |
| Start it (must be the last step) | Hands the run over to that rule. It must be the last step of the rule, or of its last choice’s branches: “Starting another rule hands the run over to it, so it has to be the last step.” |
A rule cannot switch or start itself. The started rule’s own Manual and overlap options apply.
Several devices
An action on Every profile runs once for each device of that profile in the place, up to 200 devices; devices beyond that are not acted on, and the run log says so. Devices in Manual are left out of commands and settings.
Options
| Option | Choices |
|---|---|
| If it fires while it is still running | Ignore the new one (default), Wait for the one running, then run, Run them side by side, Start over: stop the one running at its next wait |
| At most | For “wait” and “side by side”: 1 to 10 runs waiting or at the same time. |
| Also runs in Manual | “Only for a rule that just tells people or raises alarms.” |
Notes:
- Wait for the one running keeps waiting runs in memory; a platform restart drops them.
- Start over cannot cancel a step under way: older runs stop at their next wait, with “stopped: a newer run of this rule started”. What they already sent stays sent.
- Also runs in Manual is refused for a rule that sends commands, changes settings or switches rules: “Only a rule that just notifies or raises alarms may run in Manual”.
Failures
If a command, setting or alarm fails for one device (a command refused, a device limit reached), the run records that device’s failed step in History and goes on: the other devices are still acted on and the next actions still run. A failure of any other step (a notification, a condition that cannot be read) ends the run there, and History names the step that did not go through.
In JSON
"then": [
{ "id": "a1", "kind": "command", "target": { "deviceType": "<profileId>" }, "command": "fan.set", "params": { "on": true } },
{ "id": "a2", "kind": "setting", "target": { "device": "<id>" }, "key": "setpoint", "value": 21 },
{ "id": "a3", "kind": "notify", "recipients": [ { "kind": "role", "role": "ADMIN" } ], "text": "Fans switched on" },
{ "id": "a4", "kind": "alarm", "op": "raise", "target": { "device": "<id>" }, "alarmType": "fan_forced", "severity": "warning" },
{ "id": "a5", "kind": "wait", "sec": 600 },
{ "id": "a6", "kind": "wait_until", "condition": { "kind": "value", "target": { "device": "<id>" }, "key": "door_open", "op": "==", "value": false }, "timeoutSec": 900, "onTimeout": "stop" },
{ "id": "a7", "kind": "choose", "branches": [ { "if": { "kind": "sun", "is": "night" }, "then": [ { "id": "a8", "kind": "rule", "op": "enable", "rule": "<ruleId>" } ] } ] }
],
"options": { "overlap": "ignore" }

