Switching from deconz to zigbee2mqtt keeping history

Hello,
I’m in a process to switch from deconz to zigbee2mqtt.
Is there a way to keep the history of power consumption and temperature?
I don’t know if it’s possible maybe renaming entities or something ?

I’ve tried to renaming but old entities still exist in HA. I haven’t find a way to remove old entities yet. Maybe renaming the old one then renaming the new one ?

Thank you for your help.