Power consumption suddenly spikes

Hi,

I’ve been having some very annoying issues where the energy consumption suddenly shows several hundred thousand kWh of consumption.

This occurs when the power sensor is not on network and goes back on.

I think this occurs in the deconz integration.
The symptom fix has been homeassistant service shutdown, edit in SQL, apply changes and reboot.

This is because it is linked to a sum.

How do I proceed?