Steps
Set variable
Remember a value, a count or a time for later runs
Then step — What happens. Step type then-set-variable.
How it works
Remembers a value for later runs: set it, add to or subtract from it, store the current time, copy a device state or attribute, or forget it. Shared variables are visible to other flows.
Example
Device changes (Front door opened) → Set variable (doorCount + 1) → Variable is (doorCount above 10) → Send notificationCounts openings and alerts after the tenth.
Options
| Option | Key | Kind | Required | Notes |
|---|---|---|---|---|
| Variable | name | variable | yes | — |
| Do | op | select | yes | options: set, increment, decrement, now, from-state, from-attribute, clear |
| Value | value | text | yes | shown when op is set |
| By (default 1) | value | number | no | shown when op is increment / decrement |
| Device | entityId | entity | yes | shown when op is from-state / from-attribute |
| Attribute | attribute | attribute | yes | shown when op is from-attribute |
| Shared with other flows | shared | boolean | no | — |
Wire format
What the step stores in the flow definition's data bag (JSON schema).