Automations
Things that happen without a finger: timers, edges, thresholds and variable changes.
An automation is an event raised by the hardware or by time rather than by a finger on the
screen. It has a trigger and a list of actions, exactly like a widget event, and it is evaluated
inside app_poll() on every refresh. Automations live on the Data tab under
the variables.

Triggers
| Trigger | Parameters | Notes |
|---|---|---|
| On startup | Delay (ms) | Runs once, after the UI has been created. |
| Every interval | Interval (ms), Also run at startup | A periodic tick, useful for refreshing readouts. |
| Digital input changes | Input, Edge | Debounced in the generated poll loop. "Active" respects the input's active-low setting. |
| Digital input held | Input, Hold time (ms) | Fires once per press, after the input has been active continuously for the hold time. |
| Analog crosses threshold | Analog input, When it, Threshold, Hysteresis | Compared against the scaled value. Hysteresis stops it chattering around the threshold. |
| Variable changes | Variable, Condition, Value | Evaluated after every variable refresh. |
Actions
The same list a widget event offers - Change Screen, Set/Modify Flag, Set Property, Increment Slider, Play Animation, Call function and the rest - plus the four hardware actions:
- Set variable - a fixed value, a formula, an amount added, a toggle, or a widget's value.
- Set digital output - activate, deactivate or toggle an output on an MCU pin or an extender.
- Write to peripheral - a value to a writable channel, such as a PCA9685 output.
- Refresh inputs now - read every device, analog and digital input immediately.
An automation with no actions, or an action with a required field empty, is an error.
Patterns
- A readout that refreshes on a schedule. None needed - bindings already refresh every 100 ms. Use Every interval for something heavier, such as a Call function that recomputes a table.
- A thermostat. A constant variable
setpointbound both ways to a slider; Variable changes ontemperaturewith Rises above the setpoint is not expressible directly (the value is a number, not a variable), so instead give a variableheatthe formulatemperature < setpoint - 0.5and trigger Variable changes onheatwith Set digital output on a relay. - A physical button that changes screen. A digital input on the button's GPIO, active-low with the pull-up on; Digital input changes, edge Goes active, running Change Screen.
- Hold to reset. Digital input held for 3000 ms running Set variable to a fixed value.
- A low-battery warning. Analog crosses threshold, Falls below 3.4 with a hysteresis of 0.1, running Modify Flag to remove Hidden from a warning panel.
- Something once at boot. On startup with a delay, running Call function into your own code.
Generated code
Each automation becomes a block in app_poll() that keeps whatever state it needs
- the last timer tick, the previous input level and the time it went active, whether an analog
value is currently above or below its threshold, the previous variable value - and calls the
generated action sequence when its condition is met. Debounce and hysteresis are applied in the
generated code, so a chattering input or a reading hovering at the threshold fires once.
In the preview
Automations are firmware-side and the preview does not run them; use the preview drawer to
change the simulated inputs and watch the bindings, then trust the generated code for the
timing. The Digital input changes and Analog crosses threshold logic is simple
enough to read in app_logic.cpp if you want to check it.