According to 2023.4: Custom template macros, and many more new entity dialogs! - Home Assistant
- Home Assistant now keeps history when renaming entities
Before:
sensor.entitywith statistics- Renamed
sensor.entitytosensor.entity_old - Created a new
sensor.entityusing the same name - The new
sensor.entitywill have the full history (states and statistics) of the oldsensor.entity
Now: doing the same results in a complete new history (states and statistics).
How to rename entities to actually preserve the old states + statistics?
It seems to be not possible anymore for an entity to inherit the history of another entity just based on the entity_id. I really need to solve this, otherwise this would be an actual step back⦠the entity_id swap workaround worked just perfectly before 2023.4!
When reading this first I thought thatās exactly what this new feature does - instead after trying with a few entities, I lost all the history data⦠![]()
Edit: I think the core issue is when the old entity has itās own unique_id set. One simply can not transfer unique_idās to another entity, right?
EDIT 2: Outsourced to
