Replace Grid Consumption Source without losing data?

Hi,

So I got installed a PV system that comes with a Smrt Meter to get the grid consumption and energy export readings. Before, for the grid consumption, I was relying on an integration that would be directly reading from the energy meter and get that data into the Energy Dashboard.

Is it safe to remove that entity from the energy dashboard without losing any of the past data an statistics? I have been going through quite a lot of work to import the last 4 years of hourly energy consumption and would like to lose any of that data.

Anyone knows if replacing the grid consumption source will also remove previous data from the older entity? By the way, I am expecting to keep that integration working in order to check that the values between my smart meter and the company meter and similar and match.

Thanks

Well, I guess I can answer this myself.

After adding the new sensor into the Energy dashboard and having it collecting data during some hours, I decided to delete the new one (I was getting duplicated data and just left the old one with all the associated stats) and… voila, al previous data for the new sensor was vanished from the Energy dashboard.

I guess I will be proposing a FR to add an option when deleting a sensor from the Energy Dashboard in order to keep the stats up to that moment and do not keep adding stats after removal.