Energy historical data after changing meter

Hi, I’ve recently installed HA in order to control and analyze energy flows (production/usage) without energy dashboard (es. using apex-card and/or sankey-card).
Now I’m thinking about having future proof data: if I’ll need to replace of my meter with another, I will lose all the historical data or there is a way to prevent this?
A solution may be to create a sum sensor, add the meter to it and pointing my cards to this so when a replace is needed I’ll simply add the new meter to the sum sensor.
Maybe there are also other ways, but I’m looking for the easyest way possible.

Thank you!

As long as you keep the entity_id the same you can switch between your sensors.

Thank you, I didn’t know that!