Hi all,
I aim to clean up my Home Assistant instance by removing unused helpers, sensors, and other entities. However, I need a foolproof method to verify that an entity is truly unused across:
Automations (including templates in conditions/actions)
Dashboards (all card types, including hidden or conditionally visible cards)
Scripts, scenes, and blueprints
Custom integrations or add-ons (e.g., HACS items)
Indirect references (e.g., groups, areas, or templates in other entities)
What would you suggest me to do ? Is there any tool that could help me with that ?
Thanks in advance!
Thanks for mentioning spook and watchman, i am already using these integrations, but i am searching for a solution to track down if a helper is used somewhere or if it can be deleted… I have a bunch of helpers in my installation that were created over time and a lot of “ghosts” that were no longer needed… For a cleanup process it would be nice to know if this helper is used somewhere or if it can be deleted…
What would all the places be where an entity could be referenced ?
Automations (/Blueprints)
Scripts
Dashboards
Template sensors
Possibly other integrations, like generic thermostat.
If you open the helper’s more info pop-up and click on the three dots icon in the top right of the card there is a “Related” option that will show you which automations and scripts it is used in.
Be aware that the “Related” dialog will only show automations, scripts etc. where an entity/device id is explicitly/directly fed into an action/trigger/condition. If say the entity id is instead stored in a variable, and then fed into an action through a template, it will not be registered as Related.
For this reason, when I design blueprints where I only reference the entities through templates, I now add some dummy actions tagged with enabled: false at the end of the automation where the entity id’s are explitly inserted with !input so that they will show up as Related.