So, everytime the plug is completely out of power for some time, it sends a negative value of energy at the first time it sends data. As far as i noticed, the longer the plug is off, the bigger is the value. It is some cheap one, which is recognized like this.
An example from History after several periods of being off.
1 day from Energy Dashboard
I tried to manually correct values in database, but this only makes it send even bigger negative value next time it sends data like to compensate everything i corrected. I’ve read few topics here and on other sources, but no answer was found. State class is total_increasing