I have a bit of a weird problem. Every now and then, some entities are renamed to <original_entity_id>_2. I usually catch it only a while later. For example I monitor the CO2 concentration in my bedroom and regulate the home ventilation based on this value. However, at some point, I found out that the regulation is not working anymore. After searching, I found that the original sensor.co2_sensor_bedroom had become unavailable and a new sensor called sensor.co2_sensor_bedroom_2 has been added.
The containment is to remove the previous entity, sometimes through changing files in .storage and to renaming the entity_2 back to the original name. However, this happens semi-regularly to various entities and I’m at a loss on how to find what’s happening.
In this specific case, the CO2 sensor is connected through ESPHome. However, more entities suffer from this issue, I don’t remember the integrations.
I don’t know if this happens randomly or only after a restart of HA or the entire machine.
I’m running HA Supervised on an Intel NUC that runs Debian.
It happens randomly, I think around every few months.
Has anyone suffered from this issue before and/or has a direction I can start looking in?
Thanks!