Troubleshooting automations
When an automation doesn’t do what you expect, find the symptom below. Each entry explains a possible cause and how to fix it.
Most problems show up in the trace of the automation, so open the trace first. To test an automation or parts of it, refer to Testing automations.
Testing your automation, traces, and testing templates have moved to Testing automations.
My automation doesn’t trigger
Use this section if your automation doesn’t start, doesn’t run, or ignores its trigger.
Automation doesn’t trigger because it is turned off (disabled)
Symptom
The change that the trigger waits for happens, but the automation doesn’t start, and there is no new trace.
Description
The automation is turned off. A turned-off automation doesn’t react to its triggers. You can still run its actions manually, so Run actions works.
Resolution
- Go to Settings > Automations & scenes and open the automation.
- If the editor shows Automation is disabled, select Enable.
Automation with a Numeric state crossed threshold trigger doesn’t trigger when the value is already past the threshold
Symptom
The automation has a Numeric state crossed threshold trigger. The value is above or below the threshold, but the automation doesn’t start.
Description
The trigger only reacts when the value crosses the threshold. If the value was already past the threshold when the automation was turned on or Home Assistant started, the trigger waits until the value goes back and crosses the threshold again. For details, refer to Triggers react to changes.
Resolution
- Wait for the value to cross the threshold again.
- To also check the value at other moments, add another trigger, such as a Home Assistant trigger set to Start, and a Numeric state condition with the same threshold.
Automation with a State changed trigger doesn’t trigger for “Open” or “Detected” because the raw state is “on”
Symptom
The automation has a State changed trigger with a To or From state. The entity changes to that state in the UI, but the automation doesn’t start.
Description
The UI shows a state in a readable form, for example, Open for a door sensor. The trigger compares the raw state, which can be different, for example, on. If you typed the state that the UI shows, it doesn’t match the raw state.
Resolution
- Go to Settings > Tools > States and find the entity.
- Result: The State column shows the raw state.
- In the trigger, select the state from the list, or enter the raw state.
Automation with a State changed trigger and a From state doesn’t trigger after the device was unavailable
Symptom
The automation has a State changed trigger with a From state, for example, from off to on. The entity is now in the To state, but the automation didn’t start.
Description
The entity was unavailable in between, for example, because the device lost its connection. The change was from unavailable to on, not from off to on, so the From state doesn’t match. For details, refer to What counts as a change.
Resolution
If the automation should react no matter what the previous state was, remove the From state:
- Go to Settings > Automations & scenes and open the automation.
- In the State changed trigger, clear From.
- The trigger then also reacts when the entity comes back from unavailable.
- Select Save.
Automation doesn’t start while something stays true, because triggers only react to changes
Symptom
You expect the automation to start while something is true, for example, while a temperature is high. The automation doesn’t start, or only starts once.
Description
Triggers react to a change. They don’t keep checking whether something is still true. For example, a Numeric state crossed threshold trigger reacts once, when the value crosses the threshold. For details, refer to Triggers react to changes.
Resolution
- Use a trigger for the moment that the automation should start, and a conditionConditions check whether something is true at that moment, for example, whether a door is closed. You can use them in automations and scripts. If a condition is not met, the actions that come after it in the same sequence do not run. At the top level of an automation or script, this stops the automation or script. [Learn more] for what must be true at that moment.
- To check something regularly, use a Time pattern trigger, and a condition for what must be true.
My automation triggered, but nothing happened
Use this section if the automation starts, but the lights, devices, or notifications don’t respond.
Automation triggered, but its actions didn’t run: “Stopped because a condition failed”
Symptom
The trace shows that the automation started, but the device didn’t change.
Description
A condition of the automation was not met, so the automation stopped before its actions. In the list of traces, the run is marked Stopped because a condition failed.
Resolution
- Open the trace of the run.
- In the graph, select the condition that ends the path.
- Result: Step details shows the result of the condition.
- Adjust the condition. To check it, test the condition in the editor.
Automation stopped at an action: “Stopped on error”
Symptom
The trace shows that the automation started, but it stopped at an action. In the list of traces, the run is marked Stopped on error, with the error.
Description
The action failed, for example, because an option has a wrong value, or the device returned an error.
Resolution
- Open the trace of the run.
- In the graph, select the action that failed.
- Result: Step details shows the error.
- Fix the action. To check it, test the action in the editor.
Automation finished, but an action with Continue on error didn’t do anything
Symptom
The trace shows that the automation finished, but one of its actions didn’t have an effect.
Description
The action failed, but Continue on error is turned on for it. The automation then continues with the next action, and the run still finishes. The error is shown in the trace and in the logs. In the automation editor, the action shows
Resolution
-
Open the trace of the run, and select the action.
- Result: Step details shows the error.
- Fix the action. If the automation should stop when this action fails, in the Menu
of the action, turn off Continue on error.
Action ran without an error, but its area, floor, or label target has no matching devices
Symptom
The trace shows that the action ran without an error, but no device changed.
Description
The target of the action, such as an areaAn area in Home Assistant is a logical grouping of devices and entities that represents a room or space in your home, such as the living room, kitchen, or garage. [Learn more], a deviceA device is a model representing a physical or logical unit that contains entities., or a label, contains no entities that the action can control. For example, you turn on the lights in an area that has no lights. Home Assistant then skips the action without an error.
Resolution
-
Open the trace of the run, and select the action.
- Result: Step details shows the target.
- Check that the target contains entities of the right type, for example, lights for a Turn on light action.
Action doesn’t change an offline device, because its entity is unavailable
Symptom
The trace shows that the action ran, but the device didn’t change.
Description
The device is offline, so its entity is unavailable. Home Assistant skips unavailable entities, and the logs show a warning like Referenced entities light.kitchen are missing or not currently available. Some integrations send the command anyway, and show an error when the device doesn’t respond.
Resolution
- Go to Settings > System > Logs and look for the warning or error.
- Check the state of the entity. If it is Unavailable, check that the device has power and a connection.
Automation didn’t run while it was still running: “Stopped because only a single execution is allowed”
Symptom
The automation started while a previous run was still running, for example, during a delay, and the new run didn’t start. In the list of traces, the new run is marked Stopped because only a single execution is allowed or Stopped because maximum number of parallel runs reached.
For the description and the resolution, refer to I see an “Already running” warning in the logs.
My automation stopped working after an update
Use this section if an automation that used to work broke after you updated or restarted Home Assistant, or after you replaced or renamed a device.
Automation that was waiting in a delay, wait, or For at least duration didn’t finish after a restart
Symptom
An automation was waiting, for example, in a delay, a wait, or a trigger with For at least. After Home Assistant restarted, for example, to install an update, the automation didn’t continue.
Description
When Home Assistant restarts, it stops the automations that are running. A delay, a wait, or a For at least duration that was in progress is lost.
Resolution
For long waits, don’t use a delay. Instead, use a trigger for the moment that the automation should continue, for example, a Time trigger. To also handle a restart, add a Home Assistant trigger set to Start, and a condition that checks whether the automation still needs to run.
Automation stopped working after renaming an entity: “Referenced entities … are missing or not currently available”
Symptom
The automation used to work with an entity, but now it doesn’t start, or its action doesn’t change the entity.
Description
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. For actions, the logs show a warning like Referenced entities light.kitchen are missing or not currently available.
Resolution
- Go to Settings > Automations & scenes and open the automation.
- In each trigger, condition, and action that uses the old entity, select the entity again.
- Select Save.
Automation with a Device trigger, condition, or action is unavailable after replacing the device: “Unknown device”
Symptom
The automation has a trigger, condition, or action of the Device type. After you replaced or added the device, the automation editor shows Automation is unavailable, and Settings > System > Repairs shows Automation … failed to set up, with an error like Unknown device.
Description
A Device trigger, condition, or action refers to the device by an internal ID. If you add the same device again, Home Assistant keeps its ID. But the device gets a new ID when it is a different device, for example, a replacement for a broken one. It can also get a new ID when you add it again more than 30 days after you removed its integration, because Home Assistant only keeps removed devices for 30 days. The automation then refers to a device that no longer exists.
Resolution
- Go to Settings > System > Repairs and select the issue.
- Select the link to edit the automation.
- In each Device trigger, condition, and action, select the device again. If the editor shows This device no longer exists. It was replaced by and the name of a device, select Update.
- Select Save.
Automation is unavailable after an update: “Automation is unavailable” or “failed to set up”
Symptom
After you updated Home Assistant, the automation editor shows Automation is unavailable, or Settings > System > Repairs shows Automation … failed to set up or … uses an unknown action.
Description
The update changed or removed something that the automation uses, for example, an option of a trigger, or an action of an integration. The configuration of the automation is no longer valid, so Home Assistant can’t set it up.
Resolution
- Go to Settings > System > Repairs and select the issue.
- Result: The issue shows the error.
- Check the backward-incompatible changes in the release notes for what changed.
- Select the link to edit the automation, correct it, and select Save.
I can’t find my device or button as a trigger
Use this section if a device, remote, or button doesn’t show up, or shows no triggers, when you add a trigger.
Device trigger shows “No triggers” for a device
Symptom
In a Device trigger, you select your device, but the list of triggers shows No triggers.
Description
Not every integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] provides device triggers. Without them, the Device trigger has nothing to offer for this device.
Resolution
Use a trigger on an entityAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more] of the device instead:
- In the automation editor, select Add trigger.
- On the By target tab, select the device or one of its entities.
- Result: The triggers for this target are shown, for example, State changed.
- Select the trigger that fits.
Button or remote presses aren’t shown as automation triggers, because the button is an event entity
Symptom
Your button or remote has an entity that starts with event., but you don’t find its presses as a trigger.
Description
The button presses are events of an event entity. They have their own trigger, Event received.
Resolution
- In the automation editor, select Add trigger.
- On the By target tab, select the event entity of the button, or its device.
- Select Event received.
- Under Event type, select the press that should start the automation, for example, a single press.
For more information, refer to the Event received trigger.
Device or entity isn’t in the list when adding an automation trigger, because it is disabled
Symptom
When you add a trigger, the device or entity is not in the list.
Description
The device or entity is disabled. Disabled devices and entities are not shown when you add a trigger.
Resolution
- Go to Settings > Devices & services.
- Do one of the following:
- For a device, open the Devices tab, and select the device. Select Edit settings
, turn on Enable device, and select Update. - For an entity, open the Entities tab, and select the entity. You might need to change the filters of the list to show disabled entities. Select Settings
, turn on Enabled, and select Update.
- For a device, open the Devices tab, and select the device. Select Edit settings
My “Wait”, “Delay”, or “For at least” duration doesn’t work as expected
Use this section if a delay, wait, or timeout is cut short, never ends, or doesn’t wait at all.
If Home Assistant restarted while the automation was waiting, refer to An automation that was waiting didn’t finish.
Trigger with For at least reacts later than the duration, or not at all
Symptom
The trigger has a For at least duration, but the automation starts later than expected, or not at all.
Description
The For at least timer stops as soon as the entity leaves the state in the trigger. When the entity goes back to that state, the timer starts over with the full duration. For example, a motion sensor that briefly detects motion again restarts a For at least of 10 minutes on the clear state. Changes of attributes don’t restart the timer.
Resolution
- In the History panel, check the entityAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more] for short changes during the duration.
- If the entity changes back and forth, choose a shorter duration, or use an entity that changes less often.
Wait for a trigger action never finishes, or always waits for the timeout
Symptom
The trace shows that the automation is waiting at a Wait for a trigger action, although the entity already has the state that the trigger waits for.
Description
Wait for a trigger only reacts to a change that happens after the wait starts. If the entity already has that state when the wait starts, there is no change, so the wait doesn’t finish.
Resolution
- To continue right away when the state is already there, use Wait for a template instead. It continues immediately if the template is already true.
- To wait for a limited time only, set Timeout (optional).
Wait for a trigger or Wait for a template action continues after the timeout
Symptom
The automation has a Wait for a trigger or Wait for a template action with a timeout. When the timeout ends, the automation continues with the next actions, although the thing it waited for didn’t happen.
Description
Continue on timeout is turned on by default. The automation then continues after the timeout, as if the wait had finished.
Resolution
- If the automation should stop when the timeout ends, turn off Continue on timeout.
- If the next actions should only run when the wait finished, check
wait.completedin an If-then building block. It isfalsewhen the timeout ended the wait.
Wait for a template action doesn’t wait
Symptom
The automation continues right away at a Wait for a template action.
Description
If the template is already true when the wait starts, Wait for a template continues immediately.
Resolution
To wait for a change, use Wait for a trigger instead. It only continues when something changes after the wait starts.
Delay or wait is cut short in Restart mode
Symptom
The trace shows a run that stopped during a delay or a wait, and a new run that started at the same moment.
Description
The automation uses the Restart mode. When the automation starts while it is still running, Home Assistant stops the previous run, including its delay or wait, and starts a new run.
Resolution
If the running delay or wait should finish, change the mode, for example, to Single to ignore new starts while the automation is running.
My automation runs too often or twice
Use this section if the automation runs twice, runs multiple times, or keeps repeating.
Automation with a State changed trigger starts although the state didn’t change, because an attribute changed
Symptom
The automation has a State changed trigger, and it starts more often than the state changes.
Description
The trigger has no From and no To state. Then it reacts to every change of the entity, including changes of its attributes, such as the brightness of a light or the battery level of a sensor.
Resolution
- Go to Settings > Automations & scenes and open the automation.
- In the State changed trigger, under To, select the state that the automation should react to. To react to every state change, but not to attribute changes, select Any state (ignoring attribute changes).
- Select Save.
Automation runs twice at the same moment, because several triggers react to the same change
Symptom
The list of traces shows two or more runs at almost the same time.
Description
The automation has several triggers, or a trigger with several entities, that react to the same change. For example, a trigger on a light and a trigger on the group that contains the light both react when the light turns on. Each trigger that reacts starts the automation.
Resolution
-
Open the traces of the runs.
- Result: At the top of each trace, Triggered by the shows the trigger that started the run.
- Remove the trigger or the entity that you don’t need, or add a condition to ignore one of them.
Automation starts many times in a short time, because the sensor changes back and forth
Symptom
The automation starts again and again, for example, every few seconds.
Description
The entity in the trigger changes back and forth quickly, for example, a motion sensor that switches between detected and clear, or a power sensor near the threshold. Each change starts the automation.
Resolution
- Go to Settings > Automations & scenes and open the automation.
- In the trigger, set For at least to a duration, for example, 1 minute.
- The trigger then only reacts when the entity has kept the new state for that time.
- Select Save.
I see an “Already running” warning in the logs
Use this section if the logs show Already running or Maximum number of runs exceeded.
Automation didn’t start while it was still running: “Already running” or “Maximum number of runs exceeded”
Symptom
The automation started while a previous run was still running, for example, during a delay, and the new run didn’t start. You see one or both of the following:
- The logs show a warning with the name of your automation and
Already running, orMaximum number of runs exceeded. - In the list of traces, the new run is marked Stopped because only a single execution is allowed or Stopped because maximum number of parallel runs reached.
Description
The mode of the automation decides what happens when it starts while it is still running. In the default mode, Single, Home Assistant doesn’t start the new run, and logs the warning Already running. In the Queued and Parallel modes, it logs Maximum number of runs exceeded when the maximum number of runs is reached. This is how the modes work, not an error.
Resolution
- If the automation should also handle the new start, change the mode, for example, to Restart. For Queued and Parallel, you can also raise the maximum number of runs.
- If the automation should skip the new start, and you don’t want the warning, change the warning in the logs, for example, to
silent.
Something turned on or off and I don’t know why
Use this section if a light, switch, or other device turns on or off by itself, and you want to know what changed it.
Light or switch turns on or off by itself: find the automation or other cause
Symptom
A light turned on, a switch turned off, or another entityAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more] changed, and you don’t know what caused it.
Description
An automation, a script, a scene, a person, an integration, or the device itself changed the entity. Home Assistant records what caused a change in the Activity of the entity.
Resolution
- Open the entity, for example, by selecting it on a dashboard.
- In the Activity section, select the entry of the change.
- Result: The Activity details dialog opens. Under What happened, it shows what caused the change, for example:
- By automation: or By script:, with the name of the automation or script.
- By and the name of a person who changed it in the UI or the app.
- Via and the name of an integration, for example, when a scene or an action changed it.
- Result: The Activity details dialog opens. Under What happened, it shows what caused the change, for example:
- If an automation or script caused the change, select View trace to see why it ran. View trace is only shown while Home Assistant still keeps the trace of that run.
- To see which automations, scripts, and scenes use the entity, in the dialog of the entity, select Menu
, and then select Related.
Activity details show “No cause was recorded for this activity” for a device change
Symptom
In the Activity details of the change, Home Assistant shows No cause was recorded for this activity.
Description
Home Assistant didn’t record what caused the change. Often, the change came from outside Home Assistant, for example, from a button on the device, the app of the manufacturer, a schedule on the device itself, or another system that controls the device. An integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] can also report a change without a cause.
Resolution
- Check the device and the app of the manufacturer for schedules, scenes, or automations that control the device.
- Check the documentation of the integration, and the logs under Settings > System > Logs, for changes that the integration made.
My automation runs at the wrong time
Use this section if a time, sunrise, or sunset automation runs too early, too late, twice, or not at all.
Time or Time pattern trigger runs hours too early or too late, because the time zone is wrong
Symptom
Automations with a Time or Time pattern trigger run at the wrong hour, always by the same number of hours.
Description
Time triggers use the time zone of Home Assistant. If it is set to another time zone than yours, the times are off.
Resolution
- Go to Settings > System > Home information.
- On the Region card, under Time zone, select your time zone.
- Select Save.
Time pattern trigger runs once an hour instead of every few minutes
Symptom
The automation has a Time pattern trigger, for example, with Minutes set to 5. It runs once an hour instead of every 5 minutes.
Description
A number on its own means that exact value. Minutes set to 5 runs at 5 minutes past every hour. To run every 5 minutes, the value needs a / in front of it.
Resolution
- Go to Settings > Automations & scenes and open the automation.
- In the Time pattern trigger, set Minutes to
/5.- The
/counts from the clock, so/5runs at 0, 5, 10 minutes past the hour, and so on. Use a value that divides 60 evenly, such as/5,/10, or/15, to get even intervals.
- The
- Select Save.
Sunrise or Sunset trigger with an offset runs too early or too late
Symptom
The automation has a sun trigger with an offset, and it runs before the sunrise or sunset instead of after it, or the other way around.
Description
The offset is set to before the event. In the Sunrise and Sunset triggers, Offset type decides this, and Before is the default. In the Sun trigger, a negative offset means before the event, and a positive offset means after it.
Resolution
- Go to Settings > Automations & scenes and open the automation.
- In the trigger, set the offset to after the event:
- In the Sunrise or Sunset trigger, set Offset type to After.
- In the Sun trigger, remove the
-from the offset.
- Select Save.
Sun triggers are off by minutes or hours, because the home location is wrong
Symptom
Automations with a sun trigger run at a different time than the real sunrise or sunset.
Description
Home Assistant calculates sunrise and sunset from the location of your home. If the location is wrong, the times are wrong.
Resolution
- Go to Settings > System > Home information.
- On the Location card, select Edit, and then set the location of your home.
Time trigger with a date and time helper runs at midnight
Symptom
The Time trigger uses Value of a date/time helper or timestamp-class sensor, and the automation runs at midnight.
Description
The date and time helper only has a date, no time. The trigger then runs at midnight at the start of that day.
Resolution
- Go to Settings > Devices & services > Helpers and select the date and time helper.
- Select Settings
. - Under What do you want to input, select Date and time, or Time, and then select Update.
- Set the time of the helper.
- Result: The trigger runs at the time of the helper.
Time trigger with a helper or timestamp sensor doesn’t run
Symptom
The Time trigger uses Value of a date/time helper or timestamp-class sensor, and the automation doesn’t run at the time of the entity.
Description
The date and time of the entity has already passed, or the sensor is unavailable or unknown. The trigger only runs at a date and time in the future.
Resolution
- Go to Settings > Tools > States and check the state of the entity.
- If the date and time has passed, set a new one. If the sensor is unavailable, check the device or the integration that provides it.
Time trigger in the skipped hour doesn’t run on the day daylight saving time starts
Symptom
On the day that the clocks go forward, an automation with a Time trigger doesn’t run. The time of the trigger falls in the hour that is skipped, for example, 02:30. Triggers at other times run as usual.
Description
When the clocks go forward, some times don’t exist on that day, for example, 02:30. A trigger at such a time doesn’t run on that day. It runs again the next day.
Resolution
If the automation must run every day, choose a time when the clocks don’t change:
- Go to Settings > Automations & scenes and open the automation.
- In the Time trigger, set a time outside the night hours when the clocks change in your time zone, for example, a time during the day.
- Select Save.
Time trigger in the repeated hour runs twice on the day daylight saving time ends
Symptom
On the day that the clocks go back, an automation with a Time trigger runs twice. The time of the trigger falls in the hour that happens twice, for example, 02:30. Triggers at other times run once, as usual.
Description
When the clocks go back, some times happen twice, for example, 02:30. A trigger at such a time runs at both moments.
Resolution
If the automation must run only once, choose a time when the clocks don’t change:
- Go to Settings > Automations & scenes and open the automation.
- In the Time trigger, set a time outside the night hours when the clocks change in your time zone, for example, a time during the day.
- Select Save.
I get an error when I save my automation
Use this section if saving the automation fails, or shows an error such as Message malformed.
Saving an automation shows “Message malformed”
Symptom
When you save the automation, Home Assistant shows an error that starts with Message malformed:, and the automation is not saved.
Description
Home Assistant checks the automation when you save it. Something in it is not valid, for example, an option that the trigger or action needs is empty, or has a value that is not allowed. The message names the part that is not valid.
Resolution
- Read the message to find the trigger, condition, or action that is not valid.
- Fill in or correct the option, and save again.
Saving an automation in YAML mode shows a YAML error
Symptom
You edited the automation in YAML, and saving shows an error from the YAML, for example, about the indentation.
Description
The YAML is not valid, for example, because of wrong indentation, or a missing space after a colon.
Resolution
Fix the line that the error names, and save again. If you’re not sure what is wrong, switch back to the visual editor, and make the change there.
Saving a new automation shows “Cannot save automation without a name”
My automation behaves differently when I run it manually
Use this section if the automation works when you select Run actions, but not when the trigger happens, or the other way around.
Actions work with Run actions, but not when the trigger happens
Symptom
The automation works when you select Run actions, but not when the trigger happens.
Description
Run actions skips the triggers and the conditions. If the actions work this way, the problem is usually in a trigger or a condition. It can also be an action that behaves differently in a real run, for example, because it uses trigger data, or because an entity has another state at that moment.
Resolution
Open the trace of the real run, and check how it ended:
- If the list of traces has no run for that moment, the trigger didn’t react. Check the causes under My automation doesn’t trigger.
- If the run is marked Stopped because a condition failed, check the causes under My automation triggered, but nothing happened.
- If the run is marked Stopped on error, or it finished, but an action didn’t have an effect, select that action in the graph. Step details shows the error or the values it used. For the causes, refer to Automation stopped at an action, and to the other causes under My automation triggered, but nothing happened.
Automation fails with Run actions, but works when the trigger happens, because there is no trigger data
Symptom
The automation works when the trigger happens, but it shows an error or does something else when you select Run actions, or use the Automation: Trigger action.
Description
When you run the automation manually, there is no trigger, so there is no trigger data. Templates that use trigger, such as {{ trigger.to_state.state }}, have no value, and a Triggered by condition doesn’t pass because there is no trigger ID.
Resolution
Make the real trigger happen, or use a simulated trigger to test the automation with real trigger data.
The Automation: Trigger action can’t pass trigger data, so it doesn’t help to test templates that use trigger.
My condition doesn’t behave as expected
Use this section if a condition doesn’t pass although it should, or passes although it shouldn’t.
Automation doesn’t start when its condition becomes true later
Symptom
When the trigger reacted, the condition was not met. Later, the condition is met, but the automation doesn’t start.
Description
Conditions are only checked once, right after a trigger reacts. They don’t start the automation when they become true later. For details, refer to Conditions check the current state.
Resolution
- Go to Settings > Automations & scenes and open the automation.
- Under When, select Add trigger, and add a trigger for the change that makes the condition true.
- Select Save.
- Result: The automation also starts at that moment, and checks its conditions again.
For an example, refer to When two things must both be true.
Automation only runs when all its conditions are met, instead of any of them
Symptom
The automation has several conditions, and you expect it to run when one of them is met.
Description
The automation only runs when all its conditions are met.
Resolution
To run the automation when at least one condition is met, put the conditions in an Or building block:
- Go to Settings > Automations & scenes and open the automation.
- Under And if, select Add building block, and then select Or.
- Drag the conditions into the Or building block by their handle
. - Select Save.
Numeric state condition doesn’t pass when the value is exactly at the threshold
Symptom
The automation has a Numeric state condition. The value is exactly at the threshold, and the condition doesn’t pass.
Description
Above and Below don’t include the threshold itself. For example, with Above set to 20, a value of exactly 20 doesn’t pass.
Resolution
If the value can be exactly at the threshold, and it should pass, set the threshold a little lower, matching the precision of the sensor:
- Go to Settings > Automations & scenes and open the automation.
- In the Numeric state condition, change the threshold. For example, for a sensor that reports whole numbers, set Above to 19 to include 20.
- Select Save.
For a sensor with decimals, use a Template condition that compares with >= instead.
Numeric state condition doesn’t pass while the entity is unavailable
Symptom
The automation has a Numeric state condition, and the entity is unavailable or unknown. The condition doesn’t pass.
Description
A Numeric state condition doesn’t pass when the value is unavailable or unknown. This also applies when the threshold comes from another entity that is unavailable or unknown.
Resolution
- Go to Settings > Tools > States and check the state of the entity, and of the threshold entity, if you use one.
- If it is unavailable, check that the device has power and a connection.
State condition with For at least doesn’t pass after a restart
Symptom
The automation has a State condition with For at least. After Home Assistant restarted, the condition doesn’t pass, although the entity has had that state for a long time.
Description
After a restart, Home Assistant counts the time that an entity has had its state from the moment it started. The For at least duration of a State condition then starts at the restart.
Resolution
Wait until the duration has passed after the restart, or choose a shorter duration.
Time condition across midnight doesn’t pass after midnight, because of Days of the week
Symptom
The automation has a Time condition with Days of the week, and a time range across midnight, for example, After 22:00 and Before 06:00 on Friday. At 02:00 on Saturday, the condition doesn’t pass.
Description
Days of the week checks the current day. After midnight, the day is already Saturday, not Friday. The time range across midnight itself works.
Resolution
To cover exactly one night, for example, from Friday 22:00 to Saturday 06:00, split the range into two Time conditions in an Or building block:
- Go to Settings > Automations & scenes and open the automation.
- Under And if, select Add building block, and then select Or.
- In the Or building block, add two Time conditions:
- One with After set to 22:00, and Days of the week set to Friday.
- One with Before set to 06:00, and Days of the week set to Saturday.
- Remove the old Time condition.
- Select Save.
Template condition doesn’t pass although the template gives a result
Symptom
The automation has a Template condition. In the template editor, the template gives a result such as on, yes, or 1, but the condition doesn’t pass.
Description
A Template condition only passes when the template gives true. Any other result, such as on, yes, or a number, doesn’t pass.
Resolution
Change the template so that it gives true or false, for example, with a comparison such as == or >. To check the result, test the template in the template editor.
Condition doesn’t pass: “Error evaluating condition” in the logs
Symptom
A condition doesn’t pass, and the logs show a warning like Error evaluating condition in '<name of your automation>'.
Description
The condition couldn’t be checked, for example, because the entity doesn’t exist, or its state is not a number in a Numeric state condition. A condition that can’t be checked doesn’t pass.
Resolution
- Go to Settings > System > Logs, and check the error.
- Fix the condition, for example, by selecting an existing entity.
I can’t edit, delete, or rename my automation
Use this section if the automation is read-only, can’t be deleted, or keeps its old entity ID after renaming.
Automation can’t be edited or deleted: “This automation cannot be edited from the UI”
Symptom
The automation editor shows This automation cannot be edited from the UI, because it is not stored in the automations.yaml file, or doesn’t have an ID., or deleting it shows Only automations in automations.yaml can be deleted.
Description
The automation is set up in YAML, outside the automations.yaml file, or it has no id. Home Assistant can only change automations in automations.yaml that have an id.
Resolution
- To edit the automation in the UI, select Migrate. Home Assistant opens an editable copy. After you save the copy, remove the old automation from your YAML configuration.
- To delete the automation, remove it from your YAML configuration, and then reload the automations or restart Home Assistant.
Automation created from a blueprint: I can only change the blueprint inputs
Symptom
The automation editor only shows the blueprint and its inputs. You can’t change the triggers, conditions, or actions.
Description
The automation is created from a blueprintA blueprint is a script, automation, or template entity configuration with certain parts marked as configurable. This allows you to create multiple scripts, automations, or template entities based on the same blueprint, with each having its own configuration-specific settings. Blueprints are shared by the community on the blueprints exchange in the forum. [Learn more]. The blueprint defines its triggers, conditions, and actions.
Resolution
To change the automation itself, turn it into a regular automation:
- In the automation editor, select Menu
, and then select Take control. - Result: A preview of the automation opens.
- Select Yes, and then select Save.
- Result: The automation no longer uses the blueprint. Changes to the blueprint no longer apply to it.
Automation keeps its old entity ID after renaming
Symptom
You renamed the automation, but its entity ID is still the old one.
Description
Rename only changes the name of the automation, not its entity ID.
Resolution
- In the automation editor, select Menu
, and then select Settings. - Under Entity ID, enter the new entity ID, and then select Update.
If other automations, scripts, or dashboards use the old entity ID, update them too. Home Assistant doesn’t do this for you.
My automation doesn’t appear in the UI
Use this section if a new or existing automation is missing from the list of automations.
Automation is missing from the list of automations: “New automation setup timed out”
Symptom
You created an automation in the automation editor or from a blueprint, but it doesn’t appear in the list of automations. When you saved it, Home Assistant might have shown New automation setup timed out.
Description
Your configuration.yamlThe configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more] no longer includes the automations.yaml file. The automation editor saves your automations in automations.yaml, and Home Assistant only loads that file when configuration.yamlThe configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more] includes it. The default configuration includes it, but the line may have been removed when the file was edited.
Resolution
This is one of the few cases where you need to edit configuration.yamlThe configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more]. There is no setting for it in the UI.
-
Open your
configuration.yamlThe configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more]. If you haven’t edited it before, refer to editingconfiguration.yaml. -
Add this line from the default configuration back to the file:
automation: !include automations.yaml -
Reload the configuration of the automations, or restart Home Assistant.
- Result: Your automations appear in the list of automations. If you set an area, category, or labels when you saved an automation, set them again. They were not saved.