Automations

Why Your Home Assistant Automation Isn't Triggering (and How to Fix It)

Fix a Home Assistant automation that will not trigger: check whether it is enabled, read its traces, and rule out state, numeric and time trigger gotchas.

On this page
  1. Step 1: confirm the automation is on
  2. Step 2: read the traces
  3. Step 3: check the trigger’s entity
  4. Trigger gotchas
  5. Mode single and “Already running”
  6. Restarts and “unavailable” states
  7. Test conditions without faking a trigger
  8. Reload after YAML edits
  9. Common misconceptions
  10. Checklist before you ask for help

Start with two questions. Is the automation turned on? When its trigger should fire, does a new run appear in its Traces? The answers point to the right fix.

Step 1: confirm the automation is on

Go to Settings > Automations & scenes and check the automation’s toggle. A disabled automation shows as off. Also check whether a single trigger was disabled in the editor, or whether the YAML sets enabled: false on it.

Step 2: read the traces

Open the automation and select Traces. Home Assistant keeps the last five runs by default.

  • No trace appears. The trigger never fired. Go to Step 3.
  • A trace stops at a condition. The trigger fired, but a condition failed. Open the trace and find the condition that stopped the run.
  • A trace reaches an action and stops. The action failed. The error in the trace shows why.

Step 3: check the trigger’s entity

If nothing fired, look at the entity the trigger watches.

  • Open Developer Tools > States, or the entity’s history, and confirm that it changes to the value you expect.
  • Check the spelling and case of the state. States are case-sensitive and are usually lowercase, such as on, off or home.
  • If you renamed the entity, the trigger may still point at the old entity ID. Update it.
  • A device trigger can stop working after its device is re-paired or replaced. Recreate the trigger, or use an entity trigger.

Trigger gotchas

State triggers fire on a change. If the entity is already in the target state when the automation is turned on or reloaded, the trigger does not fire.

Numeric state triggers fire when a value crosses the threshold. A trigger set to “above 20” fires when the value rises past 20. It does not fire while the value is already above 20. If the sensor may already be past the threshold when Home Assistant starts, add a Home Assistant start trigger and a numeric condition to cover that case.

Template triggers fire when the template becomes true. The trigger fires when the result changes from false to true. It does not keep firing while the template stays true.

for: timers restart. If the state changes during a for: wait, the timer starts again. A restart or an automation reload cancels it.

Time triggers use the Home Assistant time zone. Check it under Settings > System > General. A time pattern runs on a schedule like this:

triggers:
  - trigger: time_pattern
    minutes: "/5"

That runs every five minutes. minutes: 5 runs at five past each hour instead. Restarting Home Assistant does not catch up on time triggers that were missed while it was down.

Mode single and “Already running”

With the default mode, single, a new trigger is ignored while a run is in progress, and Home Assistant logs an “Already running” message. This is a common reason an automation seems to miss events. If a new trigger should interrupt the current run, use restart. If overlapping runs are fine, use queued or parallel. For more on modes, see the automations and actions guide.

Restarts and “unavailable” states

When Home Assistant restarts, some entities report unavailable for a moment and then their real state. That change can fire a state trigger you did not expect. To ignore those transitions, add not_from:

triggers:
  - trigger: state
    entity_id: binary_sensor.front_door
    to: "on"
    not_from:
      - unavailable
      - unknown

Test conditions without faking a trigger

Run actions from an automation’s menu skips its triggers and its conditions. A successful run therefore does not show that the trigger works.

To check the conditions as well, call automation.trigger from Developer Tools > Actions with skip_condition set to false. This still does not test the real trigger, so keep the trace check in your routine.

Reload after YAML edits

After you edit automations in YAML, reload them from Developer Tools > YAML, or call automation.reload. A full restart also works, but it takes longer.

Common misconceptions

  • A manual run proves nothing about the trigger. It skips triggers and conditions.
  • Setting a state in Developer Tools does not change the real device. It can still fire triggers that watch that entity, so use it with care when testing.
  • Conditions are checked when the trigger fires. They are not watched continuously.
  • Restarting does not catch up on missed time triggers. A time trigger that falls during a restart does not run afterward.

Checklist before you ask for help

  • The automation is on, and its trigger entity changes as you expect.
  • The traces show whether the trigger fired and where the run stopped.
  • The mode matches how often the trigger fires.
  • If you ask for help, share the automation YAML and say whether a trace appears when the event happens. Remove tokens and passwords first.

For a worked trigger example, see how to turn on lights with a motion sensor. Variables used in triggers and templates are covered in the variables guide.

The complete guide to automations

Home Assistant Automations: Services, Actions and REST Commands
Read the guide

Keep exploring

Guides from other topics

All topics →