Hi,
I can’t figure out how to solve the issue.
I add a new zigbee smart plug to measure energy. In the zigbee2mqtt gui i reset the kwh because it had old values.
When i add sensor.pc_desk_bw_2_energy to the energy dashboard and then it goes wrong.
The situation before adding the sensor in the energy dashboard:
Something went wrong with the statistic calculation. Energy meters with the state class total increasing work like this. Every hour the change between this hour and last hours gets added to the sum of the energy meter. When the energy meter state resets it continues and does not reset the sum. This usually works but sometimes things go wrong. In this case the state change appears to have been applied to the statistics. As if your pc suddenly produced 20 kwh in one hour.
You can fix this using developer tools/statistics. There you can select the faulty statistic and using the button on the right open a window where you can adjust the statistic. You can either use the date selector to find the hour where the statistic is wrong or press the select outliers button which should find it automatically.
Then you just overwrite the -20kwh with something else. In your case probably 0.
That will fix your problem.