Energy dashboard electricity reading is incorrect

Hi, I’m using Sonoff S60 smart socket to monitor water boiler energy usage.
Energy dashboard value are incorrect at all, first kWh has “-” sign, that mean generating energy, energy value by itself also doesn’t match with Sonoff ewelink app.
To integrate sonoff devices I’m not using official integration that only does available on/off switch, instead i use SonoffLan integration:

Maybe someone experienced same issue ?
This month data:
App readings: 12.10 kWh
Energy dashboard readings: -14.18 kWh


Is the sensor periodically resetting to 0?

No, looks like increment, reset to zero happns only at new month start.
If looking at “history”, value is correct:

Sensor readings also ok, something happens in energy dashboard.

If the sensor you put in the dashboard resets itself periodically, it is vital that the state_class of that sensor is set accordingly. I’m pretty sure it is set to total instead of total_increasing. If that is the case, the drop to 0 is seen as production, not as a counter reset.

You can fix this by either use the customize integration to override the state class of the sensor, or create a template sensor which copies the state but has the right properties.

But from your screenshots, you also seem to have a non resetting total? You should use that in the dashboard instead. The dashboard will create hourly/dayly/monthly info from that without the resetting trouble.

1 Like

Yes, sensor has a non reseting total energy.
Thanks for a help and explanation, I added non reseting total, will see how it works.

1 Like