Skip to content

Automation editor ​

An automation is a rule like “when it gets dark — turn on the hallway light”. You draw it on a canvas with cards and links between them, and the home itself runs it.

WhereHow to open
AndroidSettings → Devices → Automations → “Open automations”
WebHome → Automations → “+ New” or the automation name

There's no canvas on the TV: you can't draw with a remote. The automation list with “turn on” and “run” is there.

Where an automation lives ​

What you draw is compiled into a regular Home Assistant automation. So:

  • the automation works without the app: with the tablet asleep, the phone in another room and the browser closed;
  • in the Home Assistant automation list it's labelled “Homer · <name>”, the id is homer_flow_…;
  • the drawing is stored inside the automation itself, in its variables. That's how the app recognizes its own automations. Rules written in Home Assistant by hand are visible in the list, but don't open on the canvas.

The automation is written to the home with “Save” (on the web also Ctrl+S). Above the canvas you can see where it is: “not in the home yet”, “not saved”, “saved in the home”.

Canvas ​

  • A link is dragged from the circle at the bottom of a card. Dropped on a card, it connects; dropped on empty space, it opens the “What goes here” palette, and the new node appears already connected.
  • “+ node” at the bottom of the canvas does the same, without a link.
  • Tapping a card opens its properties. Devices are picked from the home by room and name from the plan, you don't need to type entity_id by hand.
  • ✕ on a link removes it. A node is deleted with the trash can in its properties, on the web also with the Delete key. A copy of the node next to it — ⧉ in the properties, web only (Ctrl+D).
  • “Lay out” (Android — “Arrange”) arranges the tree neatly. Undo and redo are the arrows at the top (on the web Ctrl+Z, Ctrl+Y).
  • Pinch or mouse wheel — zoom. On the web, from far away cards turn into colored tiles with a title.

Tree only ​

A Home Assistant automation has no jump to an arbitrary place and no merging of branches. So an automation is a tree:

  • at most one link leads into a node;
  • at most one link leaves each output.

A tail shared by two branches is drawn as a separate automation and called from both with the “automation” action.

A node not connected to “When” is marked “detached”. The drawing is saved whole, but the home won't have this step until you connect it.

Nodes ​

NodeWhat it doesOutputs
WhenWhere it starts. There can be several triggers — that's “OR”: “it got dark or someone came home”next
IfChecks whether to go onyes, no
ChooseSeveral options, the first matching one runsper option, otherwise
DoThe only node that changes something in the homenext
WaitA pausenext
Wait forWaits for an event, but no longer than a limithappened, timed out
RepeatThe “repeat” branch so many times in a rowrepeat, then
StopThe branch ends here on purpose—

There's one “When” node; it's the root of the tree and can't be deleted. A branch also ends without “Stop” if no link leaves the output. “Stop” is there to show that it ended on purpose. Its reason is written to the home log.

A condition and a trigger are different things. A trigger is what happened: “motion in the hallway”. A condition is what's true now: “it's dark in the hallway”. Mix them up and you get a rule that waits for darkness to turn on the light in an empty hallway.

Choose reads better than a ladder of “If”s: “morning / day / evening / night” is one question with four answers. Options are checked in order. Each has a label on its link. The “otherwise” branch is always there, even if empty.

Wait for is needed for the second outcome. “The door was opened and not closed within five minutes” can only be drawn with it: the “timed out” branch.

Repeat — only with a number of times: “blink three times”, “say it twice”.

All triggers, conditions and actions are in the reference.

Triggered again ​

At the bottom of the canvas — “If triggered again while running:”. It decides what to do if the automation hasn't finished yet and the trigger has already fired again.

ChoiceWhat happensWhen you need it
skipThe repeated trigger is ignored. This is the Home Assistant defaultshort automations without pauses
restartThe running run is cut off, a new one startsalmost any automation with a pause
queueRun once for each trigger, one after anotherwhen every trigger matters

Light on motion

Set “Motion — turn on, turn off after five minutes” to “restart”. Otherwise a second motion won't extend the light, and it goes out in someone's face because the first run is finishing.

Check before saving ​

While there are errors, “Save” can't be pressed. Errors show in red above the canvas and in the node properties:

  • no name, no trigger, device, sensor or threshold chosen;
  • several links lead into a node, two leave one output;
  • a zero pause or wait limit, “repeat zero times”;
  • “restore” without “remember” in the same automation;
  • a light has both color and warmth chosen.

Grey ones are hints, and you can save with them: a node isn't connected to anything, the automation does nothing, no branch of a fork is filled in.

Conditions have a live answer in their properties: “yes right now” or “no right now” with the current reading. That way you can see whether the condition would pass right now.

Trace of the last run ​

An open automation shows how its last run went, in the home's own words:

  • a line above the canvas: “Last run: reached the end”, “condition on “…” failed, and the branch ended”, “stopped on “…” before the end”, “the home reported an error”;
  • the nodes the run went through are highlighted on the canvas.

This answers the question “why didn't it do what I drew”. Most often the run reaches the first fork and goes somewhere other than expected.

If an automation doesn't open ​

  • “The automation was saved by a newer app” — update the app or the page. Editing with an old version would erase what it doesn't understand.
  • “The automation record is damaged” — the drawing couldn't be read. The rule itself in the home is intact and works.
  • “The home rejected it: …” — Home Assistant refused to save the automation. The text after the colon is its answer.