Upgrade to 2022.6.7 gave me new cost sensors for Energy Dashboard. How to get my old data back?

Last week I upgraded my Home Assistant Core installation (running in Docker on my NAS) to release 2022.6.7. After this upgrade, I noticed that the Energy Dashboard no longer shows any costs for the time up until the upgrade. All costs became €0.00.

It turns out that after the upgrade, there is an additional set of sensors for costs. For instance, next to the previous cost sensor for gas usage (sensor.gas_m3_costs) there now is a new sensor sensor.gas_m3_costs_2

All cost data prior to the upgrade is still neatly stored in the old sensors, and the cost data from after the upgrade is now kept in the new sensors. However, the Energy Dashboard only uses the costs in the new sensors.

So although the data about my energy costs for past 10 months is there, the Energy Dashboards does not show it. How can I fix this?

Any help would be greatly appreciated.

Facing the same issue now, did you ever figure it out?

No, I’m still struggling with this. It would be great if someone knew how to solve it.