Change energy dashboard without losing history

Hello,
this is my first post, thanks for the help this forum has been.

I have a problem with my Energy Dashboard.

When I set up the whole thing, I used the wrong entity for the battery in the Energy Dashboard, or rather I probably thought at the time that I had to change it again. My inverter only outputs two entities when charging the battery.
plenticore1_battery_charge_from_grid_day and plenticore1_battery_charge_from_pv_day. Unfortunately no sum.
At that time I inserted plenticore1_battery_charge_from_pv_day.

Of course this shows wrong values. If I now create a template sensor that calculates the two together, my history data is gone.

Is there a solution for this?

Hello Thaiming,

Change the entity_id on the one with the history to something else and give your new template entity that exact same entity_id. Makes sure the units and state class of the template entity are also the same as the old one.

The new one should have the old ones data history and keep going.

More details if you put this into a search engine,

site:home-assistant.io connect to history of old entity