How to keep Energy Data when switching Device

Hi,

I am using a Shelly Plug S to monitor Energy from my Desk which has my Computer, Displays etc and turn them off all at once. Unfortunately, the relais basically died, it’s no longer cutting the power. I still hear a slight click and metric meaturement only works in “on” state.

I want to replace it with a new shelly plug and use the old (relais broken) one for a different use-case wehre I only want measurement and no on/off functionality. My question is, what is the cleanest way to preserve the already recorded energy data?

First off if you use device stuff, it makes that 56x harder. All your automations & scripts have to be edited to use the new name.
For the data to continue, there is an easy proess to name the new entity-id exactly what the old entity-id was and the data continues and all the state based automation stuff just continues to work.

Put this in a search engine for a bunch of info on the subject.

site:community.home-assistant.io device replacement