Hi,
since May 12th I have some problems in my dashboard.
I use daily counters (in kWh) to track the photovoltaic production and the energy accumulated / released by the storage batteries.
These counters return to zero every day and when they return to zero the energy component of home assistant records negative values.
Up to that day everything worked correctly, suddenly perhaps following some update, I had this problem.
I attach the sensor trend and the graphs of the energy component of home assistant.
Your sensor is resetting after midnight. I recommend also having a total counter and adding that to the energy dashboard, so that you eliminate any potential problem with resetting.
Hi,
The strange thing is that it worked until today, suddenly now I have this error.
I can create a new entity using the energy meter based on the one that resets, but inserting it into the energy configuration I would have to remove the one currently inserted. This would make me lose the history.
I also tried to change the state_class of the entity as suggested here (Energy: Solar productions shows negative value) through the developer tools, but when updating the variable the value is reset to ‘total’
I solved it by creating a new entity with the utility meter that creates a lifetime counter of the photovoltaic production: you need to remember to enable the ‘Periodically resetting’ option referred to the source.
I inserted this counter in energy, but I had to remove the previous one: this deleted any historical information so it would be better to find a solution to the problem rather than do as I did!