dummylabs / thewatchman

Home Assistant custom integration to keep track of missing entities and services in your config files
MIT License
474 stars 19 forks source link

Feature Request show helpers not used in any automation or lovelace #118

Open fcortijos opened 8 months ago

fcortijos commented 8 months ago

Please consider including this feature: show the helpers (input_boolean, input_button, input_datetime, input_number, input_select, input_text, sensor, timer, etc.) that are not used in any automation or lovelace. tks

ildar170975 commented 8 months ago

Why not using an already availably possibility of filtering entities by entity_id? And what makes automations so special, what about template sensors & others?

fcortijos commented 8 months ago

Sorry, I didn't understand what means " filtering entities by entity_id" in this context. What I'm looking for is a cross reference among Helpers and automatition and lovelace. Sensors and templates sensors could be also included. Those can be a good opportunity to clean a messy instalation after 3 years of constantly changes, where I created entities that are not being used anymore.

Tks

ildar170975 commented 8 months ago

https://github.com/dummylabs/thewatchman?tab=readme-ov-file#ignored-entities-and-services-option-example Try excluding all entities except helpers.

fcortijos commented 8 months ago

You did not understand my request. But that's ok, I coded the solution and solved the problem.

jazzyisj commented 6 months ago

@fcortijos - I understand what you were asking for. The exact opposite of what watchman does - entities that exist but aren't referenced anywhere rather entities that are referenced that don't exist (which is what watchman does).

For the UI "Unused entities" on the dashboard menu is supposed to fill that need but it isn't very useful because you can't filter it by domain or anything else (maybe a good core FR?). That wouldn't help you with helpers or template entities) you have created that aren't referenced in automations or scripts though. It's a good idea.

I'm curious how you solved the problem?

fcortijos commented 6 months ago

@jazzyisj - I'm glad that you understood my proposal. My solution was quick and dirty, not for general use. A simple python program that reads the automations.yaml e lovelace files looking for my helpers and templates entities. I print how many times each entity was found in these files, if none, that is an "issue". Tks