Keep energy history when changing p1 meter?

Hi, i want to change my dsmr usb p1 meter to homewizard p1 and keep my energy dashboard history what is the best way to do this?

I did it with changing entities to old names but i keep losing my energy history…