Energy Dashboard - Replace grid consumption/production sensors with retaining historic data

Hi all,

In my HA instance, I have configured a rooted Toon thermostat as source for the energy dashboard. The Toon is connected to the P1 port of my smartmeter, which provides the data of electricity usage/production and gas production. This gives multiple sensors in HA, which are added to the energy dashboard configuration at the sections “Grid consumption”, “Return to grid” and “Gas consumption”.

The Toon thermostat is only working for this data, it is not used anymore as thermostat. Therefore, I want to replace the thermostat solution in HA with a P1 cable, directly connected to HA.

This cable is already connected to the smartmeter (together with the Toon thermostat) and provides new sensors in HA with the same data as the Toon does.

If I remove the Toon sensors from the energy dashboard configuration and replace them with the new sensors, I loose all historic data of the Toon sensors. If I keep the Toon sensors and add the new sensors next to them, all data is shown double.

Is there any way to make the desired switch while retaining the historic data?

1 Like

Hi,

I have exactly the same issue. In my case I’m replacing a smart plug that was only monitoring one socket with a solution that monitors the entire circuit - including the previously monitored socket.
Removing the smart plug as consumption will remove it from the historic energy usage, making it look like the consumption never happened (tried this with an other irrelevant sensor).

Is there a way to remove consumption sensors while not “rewriting history”? I’m planning on removing more and more single sensors with “broader” solutions, but it would be a shame to loose all my history.

Edit: For people stumbling across this issue that have not yet started energy monitoring: Create a template sensor instead that returns the consumption/production/return etc - that will allow you to change the template while it’ll still be the same sensor and also won’t loose historic data when changing the template

1 Like