Device replacement without losing history

Hello everyone.
I have Home Assistant Core with the default SQLite DB ed zigbee2mqtt on Docker.
A Zigbee MMQ temperature sensor is broken and I would like to replace it.
I would like to “hook” the history of the previous sensor to the new one, how do I do it?

Just rename the new entity to exactly the same name as the old entity.

1 Like

Thanks, are these the steps i need to take?

  1. Delete device
    Shouldn’t I delete the story too?

  2. Rename the new entity to exactly the same name as the old entity

I would delete the “temperature entity” and any other entity you want history for.
Then rename the new entities.
Finally delete the entire old device.

See here for more info:

Thank you, very kind, the steps are clearer now.
In my entity the delete button is disabled.
I can’t find anything about this in the post you suggested.
Do you know how I can delete it?

In that case, try to delete the entire device, just keep note of the entity names.

thanks! solved!

1 Like