Energy history gone after switching from sensor

I have an issue with my Energy Dashboard.

I have switched from an ESP32 module that reads my P1 meter to the P1 reader of Homewizard. This works fine. I see all my data.

But when I remove the old sensors, that are no longer updated, my data get’s lost too. For some reason, when looking back in the history, the data is incorrect. In my case it is also that my produces solar energy is also used to display the energy that I used the same day. That’s incorrect.

Re-adding the unused sensors to my dashboard fixes the problem. But then my dashboard setup complains it has sensors, that are no longer updated.

Is there any way to remove the sensors, without losing my energy history?

I have exactly the same issue. I can’t re-add those sensors since the original sensors came from my solar inverters. From today I’m using Homewizard kWh meters. This results in new (more reliable) sensors, but I’d love to see my history again…

Thinking about this, what if you would replace a sensor by a new sensor (for example, you buy a new kWh meter when it’s broken). It would be nice if history would remain without having to rename it back to the old name (Sometimes you just want a new name for a sensor for the sake of uniqueness)

Yeah, have not been able to fix it. Lost all data.

Have added new virtual sensors and added the sensors to them. Using the virtual sensors for the energy dashboard now. Hopefully that will resolve the issue in the future.

Same issue here, still no solution ?

Add Utility Meter helper entities for the sensor. I added three for current day/week/month. In the future, if you change the underlying sensor, and the history of totals or sums of these helper eneities will not be affected.