I’m running Home Assistant Core 2024.10.1 and have had this issue for some months now. When I restart Home Assistant some Devices change their entity_id. This has the effect that Automations fail to set up.
at this point the automations work as expected until I restart Home Assistant.
This happens on 5 of my 117 Automations and it is mainly ZHA devices but not only (nissanConnect above), and it is only happening on devices that I’ve added recently. I cannot find anything related in the main log. Could it be some kind of db issue, from deleting a device or similar?
Or is there any debug/log/configuration where I can see more what entity_id the devices have or similar?
It was a bit tricky to find the actual entities, and then replace them directly in automation.yaml (I usually don’t edit this file by hand) but yes it worked!
It now looks like this
It would be nice to know why this doesn’t work with the web interface on these particular devices, it worked perfectly well on others…
Ah sorry now I understand, yes that works as well (and then you dont have to edit the automations.yaml directly).
If adding an entity-based action the actual name of the entity is used in automations.yaml and not the entity hash.
I checked in the .storage/core.entity_registry and found that my older ZHA devices have entries in there, and my newer ones don’t. That is why the device-based action works on some but not all devices. Then I’m curious, why do my newly added devices not add entries in the core.entity_registry?
But as you say, sticking to entity-based actions works.