You walk into the room, the light should come on, and nothing happens. Before you start tearing the YAML apart line by line, there is one tool that tells you exactly what went wrong. Home Assistant's automation trace records a step-by-step log of every run, showing which trigger fired, which condition blocked the flow, and where the automation stopped, so you fix the real fault instead of guessing.
Quick Answer
Open the trace first. Go to Settings, then Automations and scenes, click your automation, and open the three-dot menu to select Traces. A green path means the run completed, a red x marks the condition that blocked it, and no trace entries at all means the trigger never fired. That last case points you straight at the trigger, not the actions.
Start With The Trace, Not The YAML
The trace is the closest thing Home Assistant gives you to a flight recorder. Every time an automation runs, it captures a timeline of what triggered it, which conditions were checked, and what each action did. Home Assistant keeps the last five traces for every automation, so you can usually catch a failure the moment after it happens and look back at exactly what the system saw.
Reading it is quick once you know the colours. A green line through the steps means that part ran. A red x on a condition means the automation reached that point and stopped because the condition was not met, and clicking the x tells you why, such as a template that rendered to false or a state that did not match. The most telling result of all is an empty trace list, because if there are no entries, the automation never triggered, and your problem lives in the trigger rather than anywhere downstream.
When There Is No Trace At All
No trace is the most common and most misread symptom. It means the trigger condition was never satisfied, so look there first.
The usual culprits are a wrong entity ID, often from an entity that was renamed after you wrote the automation, a state trigger watching for a value the entity never actually reports, or a numeric threshold the sensor never crosses. Open Developer Tools, then States, find the entity, and check both its exact ID and the precise value it reports. A state trigger looking for "on" will never fire on an entity that reports "On" with a capital letter or a completely different state string.
One more catch trips up people who write automations in YAML by hand: an automation must have an id assigned for its traces to be stored at all. Automations built in the visual editor get one automatically, but a hand-written block without an id will run yet leave no trace, which makes debugging far harder than it needs to be.
When The Trace Shows A Blocked Condition
If the trace exists but ends on a red x, the trigger worked and a condition stopped the run. This is usually the easier fix because the trace points at the exact step. Click the failed condition and Home Assistant shows you what it evaluated to and why.
Common causes are a time condition that excludes the moment you tested, a state condition checking the wrong entity, or a numeric condition with the comparison the wrong way around. Templates are the frequent offender here, since a small typo or a missing default makes the whole thing render to false. The trace removes the guesswork by telling you precisely which condition failed and what value it saw, so you change one thing and re-test.
A Practical Order Of Checks
When an automation will not trigger, work through it in this sequence rather than randomly editing.
- Open the trace. If there are entries, jump to step four.
- No trace means the trigger never fired, so check the entity ID and current state in Developer Tools.
- Confirm the trigger is watching the exact state value the entity actually reports, capitalisation and all.
- If the trace ends on a red x, click the failed condition to see what it evaluated to.
- Fix the single thing the trace identified, reload automations, and trigger it again.
Most failures come down to a renamed entity, a state value mismatch, or a condition that quietly blocks the run, and the trace surfaces all three. If the hardware itself seems unresponsive rather than the logic, a quick look at the smart home and automation range helps you check whether a flaky hub or sensor is the real issue. For the small extras that keep a setup reliable, the popular accessories list covers cabling and hubs worth having on hand.
Frequently Asked Questions
Where do I find the trace for an automation?
Go to Settings, then Automations and scenes, open the automation, and choose Traces from the three-dot menu. You can also reach it from the automation editor itself. Home Assistant keeps the last five runs.
What does it mean when there is no trace at all?
It means the automation never triggered, so the trigger condition was never met. Check the entity ID for typos or a rename, and confirm the entity actually reports the state value your trigger is watching for.
Why does my YAML automation have no traces?
A hand-written automation needs an id assigned for traces to be stored. Automations made in the visual editor get one automatically, so add an id to any YAML block you wrote yourself and traces will start recording.
What does a red x in the trace mean?
It marks a condition that blocked the run. The trigger fired, but a condition was not met, so the actions never ran. Click the red x to see exactly what the condition evaluated to and why it failed.
How do I check an entity's exact state?
Open Developer Tools, then the States tab, and search for the entity. It shows the precise entity ID and the exact current state string, which is what your trigger has to match, capitalisation included.
Spending more time fighting your automations than enjoying them? Reliable hubs and sensors are half the battle. Browse the Evetech smart home and automation range and build a setup that triggers the way it should.