I’ve just (!) discovered that if you put non existent entities in some parts of the configuration (in automations, sensor templates, recorder, history for example), the config checker will not raise any error…
And so, some of my automations where no more working because some of my entity’s names have changed in the past…
Is there a way to check all configuration files for non-existent entities?
There is no way. Get inventive, look at automations that haven’t fired in a while. Then search your config for the entity_id’s that are used. You’ll need a software that searches multiple files for a string, like notepad++ or visual studio code.
For other entities, such as binary_sensor, replace states.sensor with states.binary_sensor.
This will give you some insight into which entities haven’t been updated recently and may provide clues as to which ones are defunct (i.e. non-existent).
It will list your automations in order of last_triggered. If you have automations that triggered a very long time ago, it may indicate they are using a State Trigger for a non-existent entity.
Thank you @petro and @123 for your ideas.
I’ve managed to copy/paste/edit, select only lines starting with entity_id, remove duplicates, etc. Then got all my existing entities from the template editor and search for differences between both extracts. Then search in all yams files.
My configuration seems clean now (15 entities where non-existant).
Strange that this doesn’t get more attention. I am having the same issue. Moving from deconz to zigbee2mqtt. Renaming my devices to a common standard.
Would love the have an utility for it.
I will need to go the same way and filter out all entities and see if there is a match.