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.
Please note, Lost Entity Finder only handles entity ID changes, including 'reset's. It does not handle deleted entities or unavailable entities. In addition, it cannot check your ESP devices, or any other third party thing that relies on your HA entities.
- 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.
You can also set the maximum number of tracked entity ID changes (default 1000). Raise this if you bulk-rename many entities at once.
Some types of helpers, YAML-only config, and third-party .storage files such as HACS integrations will require manual updating. These are flagged in the repair and cannot be auto-replaced. Auto Replace All Lost Entity Repairs skips repairs that are manual-only.
Lost Entity Finder adds the following entities:
| Entity | Type | Description |
|---|---|---|
| Ignored Lost Entity Repairs | Sensor | Count of lost entity repairs that are currently ignored |
| Rescan for Lost Entity Repairs | Button | Rescan for lost entity references and sync repairs |
| Ignore All Lost Entity Repairs | Button | Ignore all active lost entity repairs |
| Restore Ignored Lost Entity Repairs | Button | Clear all ignored lost entity repairs and rescan |
| Auto Replace All Lost Entity Repairs | Button | Replace all auto-fixable lost entity references (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. This will not give options to auto replace.
Example
service: lost_entity_finder.find_entity_references
data:
entity_id: light.nameUse lost_entity_finder.check_entity_id_pair to check one or more old-to-new entity ID pairs and sync repairs. Pass pairs in renames. Set create_repair_without_references to create a repair even when no stale references are found.
Example
service: lost_entity_finder.check_entity_id_pair
data:
renames:
light.old_name: light.new_name
sensor.old_name: sensor.new_name
create_repair_without_references: falseThis 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 :)