Automation points at an entity that no longer exists
Updated 25 September 2026
The symptom
"My hallway light automation just stopped working." "It worked for a year and now it does nothing." "There's no error, it just doesn't happen."
You open the automation and it looks fine. It's switched on. The trigger still makes sense. But somewhere in it is the name of a light, sensor or switch that Home Assistant no longer has, and the automation is quietly doing nothing to something that isn't there.
Why it happens
Automations find devices by their entity id, a name like light.hallway or binary_sensor.front_door. If that name stops existing, nothing rewrites the automation for you. The usual ways it happens:
A device was re-paired. A new battery, a Zigbee device that dropped off and was joined again, a hub that was swapped. The device comes back as a new entity. If the old one is still registered, the new one can't have its old name, so it becomes light.hallway_2, and every automation still says light.hallway.
An entity's ID was changed in Settings → Devices & services → Entities. Home Assistant doesn't update automations, scripts, scenes or dashboards that used the old ID, so anything that still names it stops working.
An integration was removed or replaced. Moving from one Zigbee integration to another, or from a cloud integration to a local one, changes the names.
The automation uses a device id instead of an entity id. These look like a long string of letters and numbers. A re-paired device gets a new device id, so the automation points at a device that no longer exists. It may fail to load (it shows as unavailable, and the log says why), or, for a device action, fail only when it runs.
The reason this is so common is that it fails silently. An action aimed at a missing light doesn't crash anything. At most you'll see a warning in the log.
Here is what our check recorded on a demonstration instance, reading every automation and script body and comparing the entities it names with the ones that actually exist:
What the check recorded for each automation or script with a missing reference
script.morning_gone: missing light.gone_3 (0 of 1 references still fine)
automation.guard_orphan_automation: missing light.does_not_exist_anywhere (1 of 2 references still fine)
automation.disable_case: missing switch.gone_1, switch.gone_2 (0 of 2 references still fine)
automation.edit_case: missing light.lounge_lamp_old (1 of 2 references still fine)
Demonstration instance: a disposable Home Assistant with made-up entities, run on our own test bench. Not a customer's house. The text in the box is exactly what the service's check and safety rules produced on it.
How to fix it yourself
Find every broken reference, not just the one you noticed. The quickest route is the log: go to Settings → System → Logs and search for "Referenced entities" or "not currently available", which is how Home Assistant reports a missing entity, or for the automation's name. For a complete picture, open each automation (Settings → Automations & scenes), choose the three-dot menu, then Edit in YAML, and check every entity_id: against Settings → Devices & services → Entities. If you edit your config files directly, search automations.yaml, scripts.yaml and scenes.yaml for the old name.
Work out what each missing entity became. Search Settings → Devices & services → Entities for part of the old name. A re-paired device usually shows up with _2 on the end. Open the device page (Settings → Devices & services → Devices) to see every entity it now owns: the battery sensor and signal sensor usually moved too.
Decide: rename the new entity back, or edit the automation. If a device was re-paired, the cleanest fix is often to give the new entity the old name, so every automation, dashboard and script picks it up again at once. To do that, first delete the old, dead entity (open it in Settings → Devices & services → Entities, then the cog, then Delete), then rename the new one to the old id. Only do this if the old one really is dead.
Or edit the automation to use the new name. Open it, change the entity in the trigger, condition or action, and save. Home Assistant validates the automation when you save, which catches typos.
Replace device ids while you're in there. If a trigger or action shows a device picker rather than an entity, switch it to the equivalent entity: a State trigger on binary_sensor.front_door rather than a Device trigger on the door sensor. This is what stops the same fault happening next time the device is re-paired.
If nothing it names exists any more, switch it off. An automation whose every entity is gone can't do anything except fill your log. Turn it off from the automations list, or delete it if you're sure you don't need it.
Test it. Use the automation's three-dot menu, Run actions, to check the actions work, then trigger it for real and look at its trace (Traces, in the same menu) to confirm it ran the way you expected.
Check the other places that name the entity
Automations are the obvious consumer, but not the only one. Before you call it done, search the same old name in your scripts, scenes, dashboards, and any helper that stores entities in its settings (groups, min/max, threshold and thermostat helpers all do). Some of these follow an entity's ID change and some may not, so check each one.
Do it properly
Refer to things by entity_id, not device_id. Entity ids survive a re-pairing if you delete the old entry first; device ids never do.
Before renaming or removing anything, find every consumer of the old name, change them all, then search for the old name again and expect zero results.
The check this service applies before editing an automation: it must be one the check found broken, its id and name must stay the same, every replacement entity must exist and be working right now, only the broken references may change, and a replacement that uses a device id or a template where a plain trigger would do is refused. It switches an automation off only when every single thing it refers to is missing:
The safety rule for switching an automation off, applied to two of those automations
Switch off automation.disable_case -> ACCEPTED: the check can prove this change is justified
Switch off automation.guard_orphan_automation -> REFUSED: automation.guard_orphan_automation still refers to entities that exist (1 of 2 are fine), so some of it still works and switching it off would remove that
Demonstration instance: a disposable Home Assistant with made-up entities, run on our own test bench. Not a customer's house. The text in the box is exactly what the service's check and safety rules produced on it.
Or we'll do it for you: the Check-up (A$29) finds every broken reference and switches off automations that point at nothing at all; Repair (A$89) repairs the rest. No subscription.