Flux Guide ← All widgets
Configuration

Automations & Helpers

Flux runs its own automations on-device — so you can mix Home Assistant and Apple Home in a single rule, retheme a dashboard, or fire on a geofence the moment you arrive. It also builds helpers: virtual computed entities (groups and math) that behave like any real device everywhere in the app.

Flux automations

A Flux automation is a trigger → conditions → actions rule that the Flux app evaluates itself, on one of your signed-in devices. Because it runs in Flux (not inside Home Assistant), an action can reach an Apple Home device, recolor a page, or animate an SVG widget — things HA can't do. Each automation also serializes to Home Assistant's exact trigger/condition/action JSON, so HA-only rules export cleanly and existing automations parse back in for editing.

Triggers

TriggerFires when
Entity changesAn entity's state changes. Optionally pin a from and/or to state, and require it to hold for a number of seconds.
Value crossesA numeric value crosses a line — above (was at or below, now above) or below (was at or above, now below). It's the crossing that fires it, not merely being over the line.
At a timeA clock time (HH:MM). Checked on the scheduler tick.
SunSunrise or sunset, with a + / − minute offset. Reads Home Assistant's sun.sun next_rising / next_setting.
Location (geofence)This iPhone/iPad enters or exits a zone, via CoreLocation region monitoring on the device itself.

Conditions

Conditions are optional gates checked after a trigger fires; the action only runs if they pass. Combine several with and (all must pass) or or (any passes).

ConditionPasses when
Entity isAn entity is in a specific state.
Value isA numeric value is above and/or below the bounds you set.
Time is betweenThe current time is inside an after → before window.

Actions

Actions run in order. Most call a Home Assistant service on a target entity; a few are Flux-side (they fire a custom HA event that the Flux app — iPhone, iPad, or Apple TV — picks up and acts on).

ActionWhat it does
Turn on / Turn off / ToggleThe matching service on the target entity's domain.
Set brightnesslight.turn_on with a brightness percentage.
Set colorlight.turn_on with an RGB color.
Set temperatureclimate.set_temperature.
Activate scenescene.turn_on.
Control media playerPlay/pause and other transport, volume set, select source, or play media (content id + type).
Record cameracamera.record with a duration and a (templatable) filename.
Send notificationA local notification on iPhone/iPad (asks permission the first time). Apple TV doesn't post these.
WaitA delay in seconds before the next action.
Set dashboard themeFlux-side: fires flux_set_theme so the app applies a theme to one page or all pages. See Themes.
Animate SVG widgetFlux-side: fires flux_svg_animation to play a one-shot pulse, spin, flash, bounce, or shake on a target SVG widget.
Cases (branch by condition)HA's choose — the first case whose conditions pass runs, otherwise an "otherwise" branch.
Mixing HA and Apple Home Because the rule runs inside Flux, the same automation can act on a Home Assistant light and an Apple Home accessory — including helpers — in one sequence. That's the whole reason Flux automations exist alongside HA's own.

Where they run — the "runs here" rule

To stop two signed-in devices from firing every automation twice, exactly one device is the designated runner. Apple TV defaults to on (it's always awake); other devices default to off. You flip it in Settings → Flux Automations → "Run automations on this device." If a paired Apple TV is already the runner, enabling it on a second device is refused — but you can always turn it off.

The runner must be awake Time and Sun triggers are checked by a scheduler that ticks every 20 seconds, and state triggers only fire on the runner. If the designated device is asleep, those triggers don't fire. An Apple TV makes the most reliable runner.
Geofence is the exception Location triggers run regardless of the "runs here" setting, because they're inherently device-local — this is the iPhone/iPad that physically crossed the zone boundary. Deferring them to the Apple TV runner would mean they'd never fire.

De-duplication

Scheduled triggers (Time / Sun) are guarded so they fire once per occurrence: the engine remembers when each schedule last fired and skips a re-fire within ~70 seconds, so a single 08:00 trigger can't double-fire across consecutive 20-second ticks.

Helpers

A helper is a virtual entity Flux computes on-device from other entities — Home Assistant and Apple Home — so it can mix sources HA can't. Each helper is materialized into the live entity store as a synthetic entity, so it shows up and works everywhere a real entity does: on dashboards, in automations, and in search. Helpers are stored and CloudKit-synced alongside your automations, and recompute whenever any underlying entity changes.

HelperWhat it produces
Group of devicesControl several lights or switches together as one device. It reads as on when any member is on (or only when all are, if you choose), carries the first lit member's color/brightness so the tile looks live, and fans your taps out to every member.
Combine valuesReduce several sensor readings into one: average, sum, minimum, maximum, median, range (max − min), or most recent.
Custom formulaMath across entities using single-letter variables A…F (the first six members) — e.g. A + B, A − B, A × 2, with parentheses. Evaluated by a hand-written, crash-safe parser that returns nothing on bad input (no NSExpression).
Rate of changeHow fast a value changes over time — per second, minute, or hour (e.g. power from an energy meter).
Threshold (on / off)A binary sensor that turns on when a value goes above/below a line (or inside a range), with an optional hysteresis buffer so it doesn't chatter at the edge.
Count what's onHow many of the chosen devices are currently on.

Numeric helpers (combine, formula, rate of change, count) take an optional display unit, device class (for the right icon), and decimal precision; threshold helpers behave like a binary_sensor; group helpers take on their members' domain.

Helpers stack A helper can use another helper as a member — Flux recomputes in a few passes so a helper-of-a-helper settles — and because helpers re-enter the entity store, automations can trigger off them too.

Zones

Geofence zones are circles you draw on a map in Settings → Geofence Zones — each is a name, a center (latitude/longitude), and a radius (default 100 m). An automation's Location trigger picks a zone and fires on enter or exit. The zone's coordinates are copied into the trigger, so the engine and the device's region monitor work entirely from the trigger itself.

On-device Zones are watched by this iPhone/iPad's CoreLocation. An exported HA config keeps the trigger as a custom flux_geofence event so the config stays valid even though HA isn't the one firing it.

Themes

A theme sets a dashboard's background, tile style, accent, and text colors so a layout looks consistent across iPhone, iPad, and Apple TV. Themes are per page — each page can carry its own — and there's a large built-in library (Clean Light/Dark, Midnight, Ocean, Forest, Sunset, Neon, Aurora, the four seasons, and more).

The Seasonal option auto-rotates: it resolves to Winter, Spring, Summer, or Fall based on the current calendar month, so a page follows the seasons on its own.

Automations can change themes too. The Set dashboard theme action fires the Flux-side flux_set_theme event with a theme and a target page ("" = all pages); every signed-in Flux app listens for it and applies the theme live. Pair it with a Sun or Time trigger for, say, a dark theme at sunset.

Notes