Detect lost entity references after entity ID changes in Home Assistant. When you change an entity ID (for example sensor.door -> sensor.window), Lost Entity Finder finds automations, scripts, scenes, dashboards, groups, helpers, and yaml files that still use the old ID and raises one repair per changed entity ID with direct links to each location, along with options to ignore or auto-replace in bulk.
Lost Entity Finder only handles entity ID changes. It does not handle deleted entities, unavailable entities, or general missing-entity audits.
- Add
https://github.com/kattcrazy/Lost-Entity-Finderas a custom repository in HACS (category: Integration) - Search for Lost Entity Finder & click Download
- Restart Home Assistant
- Add the integration under Settings → Devices & services
- Copy the
custom_components/lost_entity_finderfolder into your Home Assistantcustom_componentsdirectory - Restart Home Assistant
- Add the integration under Settings → Devices & services
On setup you can enable Auto-Replace (bulk fix). Default is off. Change this anytime via Settings → Devices & services → Lost Entity Finder → Configure.
Some types of helpers, YAML-only config, and third-party .storage files such as HACS intergrations will require manual updating. These are flagged in the repair and cannot be auto-replaced.
Lost Entity Finder adds the following entities:
| Entity | Type | Description |
|---|---|---|
| Lost Entities | Sensor | Count of changed entity IDs that still have lost entity references |
| Ignored Lost Entities | Sensor | Count of changed entity IDs that are currently ignored |
| Ignore All | Button | Ignore all active lost-entity repairs |
| Restore Ignored | Button | Clear all ignored lost-entity repairs and rescan |
| Auto-Replace All | Button | Replace all lost entity references (entity only created if Auto-Replace is enabled) |
After an entity ID change, open Settings → System → Repairs. Each lost entity ID will have a repair listing all locations that still reference it.
Use lost_entity_finder.find_entity_references to scan for a specific entity ID on demand. Will create a persistent notification with links to all instances of the entity id.
Example
service: lost_entity_finder.find_entity_references
data:
entity_id: light.nameUse lost_entity_finder.create_manual_repair to create a repair from a supplied old/new entity ID pair. You can then choose to auto-replace all instances from the repair.
service: lost_entity_finder.create_manual_repair
data:
old_entity_id: light.old_name
new_entity_id: light.new_nameThis project uses the GNU General Public License v3.0. See LICENSE for the full legal text. In short: you can use, change, and share it freely. If you distribute a modified version, you must offer it under the same license and share the source too, so the work (and its derivatives) stay open. You cannot take this code, tweak it, and ship it as a closed product.
Hope this helps! Built to solve my own problem ;)
Contributions/PRs welcome.
If this helps you out a heap as I'm sure it will, consider supporting me here :)