Main

A Quarterly Audit for Home Assistant Automations: Finding Rules That Are Stale, Silent, or Fighting Each Other

Most automations don’t fail loudly. They stop firing, quietly skip an action, or start contradicting a rule you wrote two years ago and forgot about. The failure is rarely visible until something that should have happened didn’t — the porch light that stayed dark, the heat that came on at 3 a.m.

A quarterly audit is the maintenance pass that catches these before they bite. The useful version isn’t a hunt for rules that “look old.” It’s a repeatable pass through the evidence Home Assistant already produces — traces, the automation list, the Repairs panel, and the logs — and a decision per rule: keep, fix, disable, or delete.

This is the procedure I’d run on a local-first stack (Home Assistant with Zigbee2MQTT, Z-Wave JS, ESPHome, MQTT) where the automations are yours to maintain and there’s no vendor dashboard quietly doing half the work for you.

Why “stale” and “conflicting” are symptoms, not diagnoses

Two documented behaviors explain most of what people call a stale automation.

First, triggers react to changes, not to ongoing truth. Home Assistant’s own documentation is blunt about this: “A trigger reacts to a change, such as a light turning on or the sun setting. An automation does not keep checking whether something is true.” A numeric-state trigger set to fire above 25 °C will not fire if the temperature was already 26 °C when you saved the automation — it waits for the value to drop below and cross back up. A rule that “should have run” but didn’t is often waiting for a change that never came, not dead. (Home Assistant: How automations react to changes)

Second, conditions are checked once, right after the trigger fires. “It isn’t checked again later, and it doesn’t start the automation when it becomes true,” the same page states. So a rule with a trigger on motion and a condition on “sun is down” will do nothing if motion happens at dusk and the sun sets two minutes later. The rule isn’t stale; the trigger and condition are mismatched.

That reframes the audit. The question isn’t “is this rule old?” It’s “when did this rule last run, and did it finish the way its author intended?” A rule that hasn’t run in 90 days is a candidate for review, not automatically for deletion. A rule that runs constantly and does nothing useful is a stronger candidate for removal than one that runs twice a year and matters both times.

Step 1 — Inventory the automations and their state

Start at Settings → Automations & scenes. You’re building a list, not fixing anything yet. For each automation, note:

  • Enabled or disabled. A turned-off automation doesn’t react to its triggers, but its actions can still be run manually — so a disabled rule can look alive in the editor while doing nothing in the house. (Home Assistant: Troubleshooting automations)
  • Whether it has an id. An automation with an ID stores debug traces; without one, you have less to work with when something goes wrong. The ID must be text. (Home Assistant: Automations in YAML)
  • Its mode. The default is single, which means a second trigger while the first run is still going is dropped. If a rule has a delay or a wait in it, that’s a place to look for “it only works sometimes.”

If you have a lot of automations, the Activity panel is the fastest way to see what’s actually been firing. It can be filtered by Triggered by to show only activity caused by Automations, Scripts, or Integrations. (Home Assistant: Activity) That gives you a rough last-seen picture without opening every rule.

Write the list down. A spreadsheet, a text file in the same repo as your YAML, or a note in your password manager all work. The point is that next quarter you compare against something.

Step 2 — Read traces, not logs

Logs tell you something happened. Traces tell you what the automation did. Home Assistant records a trace every time an automation runs: “a step-by-step record of what happened,” showing which trigger started it, whether each condition passed, what each action did, and which variables changed. (Home Assistant: Testing automations and traces)

Open a recent run from the automation list (overflow menu → Traces) or from the editor’s Traces button. Walk the graph. The list of runs shows how each one ended, and the endings are the audit’s raw material:

  • Stopped because a condition failed. The trigger fired, the condition didn’t pass. Either the condition is wrong, or the trigger fires at a moment when the condition can’t be true. This is the single most common “stale” rule in disguise.
  • Stopped on error. An action failed — a wrong option value, a device returning an error. The trace shows the error on the failing step. (Home Assistant: Troubleshooting automations)
  • Stopped because only a single execution is allowed. The rule was still running when it triggered again. If you see this often, the rule is doing too much in one pass, or the mode is wrong for the job.
  • Finished, but an action with Continue on error didn’t do anything. The run looks successful; the action silently failed. The trace and logs both show the error, but only if you look.

One practical note: the default is five stored traces per automation. If a rule fires often and you need to see older runs, raise stored_traces under trace: in YAML. (Home Assistant: Automations in YAML) Don’t raise it on everything — traces take space, and five is enough for most rules most of the time.

Step 3 — Test conditions and actions in isolation, then with a simulated trigger

Before you rewrite a rule, find out which half is broken.

In the editor, each condition has a state indicator. Hover it and the tooltip says whether the condition passes right now. You can also test a condition on its own from its menu. The catch, documented plainly: the test runs “without trigger data or variables from earlier blocks. If the condition depends on them, the result is not reliable.” (Home Assistant: Testing automations and traces)

Same for actions: Run action executes one step without trigger data. Useful for confirming a service call works; useless for confirming the rule works end to end.

When the rule depends on which trigger fired — a choose block keyed on trigger ID, a template reading trigger — use a simulated trigger instead. Set the entity’s state in Settings → Tools → States to reproduce the change the trigger waits for, or fire the event in Settings → Tools → Events. The automation then runs from the start with real trigger data.

Read the warning before you do this. Simulating a state change or firing an event “starts every automation with a trigger that reacts to it. Those automations control real devices and services.” (Home Assistant: Testing automations and traces) On a house with a dozen rules watching the same motion sensor, that’s a dozen rules running for real. Turn off the ones you don’t want to fire first, or do this test at a time when a stray light turning on doesn’t matter.

Step 4 — Check for broken references after renames and device replacements

This is the most common cause of a rule that “used to work.” Home Assistant does not update automations when an entity ID changes: “The entity ID changed, for example, because you renamed it. Home Assistant doesn’t update automations when an entity ID changes, so the automation still uses the old entity ID.” (Home Assistant: Troubleshooting automations)

Device triggers, conditions, and actions are worse in one way: they reference the device by an internal ID. Replace a failed sensor and the new one gets a new ID, so the automation now points at a device that no longer exists. The editor shows Automation is unavailable, and Settings → System → Repairs shows a setup failure with an error like Unknown device. (Home Assistant: Troubleshooting automations)

So the audit has two checks here:

  1. Open Repairs. Any automation-related repair is a broken rule. Fix it or disable it; don’t leave it sitting there.
  2. Search the logs for Referenced entities and missing or not currently available. That warning appears when an action targets an entity that no longer exists or is offline. It’s easy to miss because the automation still runs — it just doesn’t do the thing.

If you’ve renamed entities recently, this is where the audit earns its keep. A rule that targets light.kitchen after you renamed it to light.kitchen_ceiling will keep firing and keep doing nothing.

Step 5 — Check timing assumptions

Long delays and waits are a maintenance liability, and the documentation says why: when Home Assistant restarts, it stops running automations, and “a delay, a wait, or a For at least duration that was in progress is lost.” Reloading automations does the same to a changed automation’s run. (Home Assistant: Troubleshooting automations; How automations react to changes)

In the audit, flag every delay or wait longer than a few minutes. For each one, ask whether a time trigger plus a condition would be more robust. A rule that says “turn the fan off in two hours” loses its timer on every restart; a rule that says “at 22:00, if the fan is on, turn it off” survives restarts because the trigger is a clock event, not a pending wait.

This is also where a mechanical timer or a plain switch is the smarter choice. If the job is “run the bathroom fan for 20 minutes after the switch is pressed,” a timer module in the switch does it without a network, a server, or a restart. Home Assistant is the right tool when the rule needs to know something the switch can’t — occupancy, time of day, another sensor’s state. When it doesn’t, the simpler device wins on reliability.

Step 6 — Decide per rule: keep, fix, disable, or delete

Now you have evidence. Make a decision for each automation and write it down next to the rule:

  • Keep. It ran recently, finished the way it should, and still matches what you want the house to do. No change.
  • Fix. The trace shows a specific fault — a condition that can’t be true when the trigger fires, a broken entity reference, a lost delay. Fix the fault, then re-test with a simulated trigger.
  • Disable. The rule might be wanted but isn’t right now, or you’re not sure. Disabling is reversible and stops it from acting. Note why.
  • Delete. The rule duplicates another, targets hardware you no longer have, or was an experiment that never mattered. Deleting is cleaner than leaving a disabled rule to confuse the next audit.

Before deleting, check whether another automation, a script, or a dashboard uses it — the YAML documentation calls this out explicitly for automations you remove from a file. (Home Assistant: Automations in YAML) A script called by three rules isn’t stale just because one of them is.

Conflicts: what they actually look like

Home Assistant has no automatic conflict detector, and I’d be skeptical of any tool that claimed to find them reliably. What you can find by reading is a small set of patterns:

  • Two rules, same target, different triggers. One turns the hallway light on at motion; another turns it off at 23:00. If motion fires at 22:59, the light comes on and goes off a minute later. Neither rule is wrong; together they produce a result nobody intended. The fix is usually a condition on one of them, or merging them into one rule with a choose.
  • A condition that can never be true when its trigger fires. The trace shows “Stopped because a condition failed” on every run. This is the most common conflict, and it’s internal to one rule.
  • A rule that fights a manual action. Someone turns the light off; an automation turns it back on because its condition still holds. The trace shows the automation firing right after the manual change. The fix is a condition on the light’s current state, or a short suppression window.

None of these require a special tool. They require reading the trace of a run that did the wrong thing and asking which rule made the last change. The Activity panel’s Triggered by filter is the fastest way to answer that.

A repeatable quarterly checklist

Run this once a quarter. It takes an hour on a typical home, less once you have last quarter’s list to compare against.

  1. Export the list. Settings → Automations & scenes. Note name, ID, enabled state, mode, and last-triggered if visible.
  2. Open Repairs. Fix or disable every automation-related repair.
  3. Search the logs for Referenced entities and Unknown device. Fix or disable each hit.
  4. Open the trace of the most recent run for every automation that ran in the last quarter. Note how it ended.
  5. For every rule that hasn’t run in 90 days, decide: is it waiting for a change that never comes (fix the trigger), or is it genuinely unused (disable or delete)?
  6. For every rule with a delay or wait over a few minutes, ask whether a time trigger plus condition would survive a restart better.
  7. For every rule that shares a target with another rule, read one trace from each and check whether they can produce a result neither intended.
  8. Write the decision log. One line per rule: keep, fix, disable, or delete, with the evidence (trace ending, repair, log line).

The decision log is the part that makes the next audit cheap. Without it, you re-derive the same judgments every quarter. With it, you compare: what changed, what broke, what you decided last time and whether it held.

What this audit won’t do

It won’t catch a rule that’s wrong in a way that only shows up in conditions you haven’t hit yet — a heating rule that misbehaves below a temperature your house hasn’t seen this year, for example. I haven’t seen a way to test those without either waiting or simulating the condition, and simulating a temperature sensor’s state is a real-device action, not a dry run.

It also won’t replace reading your own automations. The traces tell you what happened; only you know what you meant. The audit’s job is to put the evidence in front of you at a regular interval, so the gap between what happened and what you meant gets noticed before the house does something you didn’t want.

If you’re building the habit for the first time, the companion piece on auditing the small systems that quietly run your week covers the broader maintenance rhythm this fits into.

FAQ

How many traces should I keep per automation?

The default is five. That’s enough for most rules. Raise stored_traces only for rules that fire often and where you need to compare several runs — a lighting rule that misbehaves intermittently, for example. Traces take space, and a higher number on every rule is wasted storage.

Can I share a trace when asking for help?

Yes, but clean it first. A downloaded trace can contain passwords from secrets.yaml, webhook IDs, and the location of a person. The documentation is explicit: remove this information before sharing, and if you’ve already shared a password or webhook ID, change it. (Home Assistant: Testing automations and traces)

What if an automation shows “Automation is unavailable” after an update?

An update can change or remove an option the automation uses, so the configuration is no longer valid and Home Assistant can’t set it up. Check Settings → System → Repairs, read the error, check the release notes for backward-incompatible changes, then edit and save the automation. (Home Assistant: Troubleshooting automations)

Is a rule that hasn’t run in 90 days automatically stale?

No. Some rules are seasonal — a heating rule that only matters in winter, a garden watering rule that only matters in summer. The 90-day mark is a prompt to look, not a verdict. The trace and the rule’s purpose decide.

Should I use the UI or YAML for automations I audit regularly?

Either works. The UI writes to automations.yaml, which the documentation says is managed by the UI and shouldn’t be edited manually. If you write automations directly in YAML, check the configuration under Settings → Tools → YAML → Check configuration before restarting, and reload automations after changes. (Home Assistant: Automations in YAML) The audit procedure is the same either way; what changes is where you make the fix.