I have recently configured my energy dashboard to read from my egauge. Everything looked good for the first day, but since then the Energy Distribution widget is wrong even though the individual source values look to be correct.
You can see that grid to house (Grid consumption) is 0, house to grid (Return to grid) is 12.38kWh, and solar (Solar production) is 27.03 kWh. On the widget I would expect to see solar producing 27.03, 12.38 going to the grid, and the house using about 15. Instead it looks like the house is using nearly 40 and there is a dot moving from grid to house. It seems like it is adding the ‘Return to grid’ value to the power used by the house.
I guess that the big spike of midnigh is the cause. The purple bar represent the “house to grid”, and it must be a negative value… instead it seems that you have a quite huge spike at midnight of positive value of + 20/25 kWh (wich by the way is A LOT of energy).
When i see this spike, I imeediately think about some wrong value returned from integration / PV. you can try to investigate / fix it using the statistics tabs of Developer Tools: Link to Developer tools: statistics – My Home Assistant
Yeah, I have to assume that is a sensor error and seems to happen the same time each night. Even so, I am not sure how that would impact the Energy Distribution since that is a real-time(ish) representation. I will dig around and see if I can figure out how to mitigate that nightly spike in any case.
I read an old post related a similar behaviour in Huawei PV integration. After a firmware update it seems that all the inverters started to have this kind of behaviour. The first reponse from the comunity was to provide a code for template sensor with some logic to “mitigate” as much as possible, the spike.
It is not real-time. It is an energy summary of the entire selected window.
If you have a specific day selected, it represents the sum of all flows during that day. If you have a year selected, it is the sum of all flows during that year. etc.
So whatever data was recorded in the 12AM window definitely affects it.
The -19.2 matches the big drop in the reading between 11:55 and 12:00 (which I assume is the daily sensor resetting) but it is never negative. At worst it drops to 0. I have no idea where the negative values are coming from, but that definitely messes with my readings.