How to import historical energy data

Hello. Thank you for this great tool. It took me a couple of evenings but all DSMR data from domoticz is imported in HA. Data from 2020, I didn’t want to loose this when migrating to HA!!

I have 2 questions:

  1. In june 2022 I received a new energy meter. Which caused the energy data to go from 9.015 kWh (old meter) to 12 kWh (new meter). This results in a negative value of -9.013 kWh on this day. This corrupts my data.
  2. The same for my solar system. I added my solar system a couple of days after start of operation. Start value is 70 kWh. This results in a big value of 70 kWh on the first day. This corrupts my data.

Is there any way to fix this?

Thank you in advance!!