OK!
After the thread here was derailed, let me start from scratch and document the problem again.
Maybe someone who observes the same can speak up, or someone who understands how the Dashboard works can propose an explanation.
.
.
During the past months I had several occasions where the Energy Dashboard (and only the Dashboard) showed nonsense Values for a single hour.
In the first case I tried to fix the values stored in the Database and broke the DB in the process.
So I started over, but this time build my own counters which now proof (besides common sense) that what the Dashbord is telling is not only bogus, but also only affects the Dashboard.
The general Setup:
But I have this over several Versions since early december. Its essentialy a day-0 issue.
A Shelly 3EM provides Power Measurement for all 3 phases.
This Numbers are summed up and then split by a template Sensors into Power from Grid and Power to Grid.
For both Sensors exist left Rieman Sum Helpers, which provide the Energy Values used in the Dashbord for Energy to Grid and Energy from Grid.
Details on the Template Sensors see here:
Shelly 3EM 3-phases Energy sensor - #166 by Zarox666
A Shelly 1PM measures the production of the Solar Panels, Its power value is also feed into a left Rieman Sum which in turn is listed in the Dashboard for the Production.
2 Shelly Plug S measure the power that goes into the UPS and into the Battery-Charger connected to the UPS Battery. Here the Energy values provided by the two Shellys are summed up in a template sensor and this is provided to the Dashboard as Energy to Battery.
A Shelly 1PM measures the output from the UPS and is used in the Dashbord directly.
.
.
Case 1: 15kWh into battery
The UPS is a 330VA APC with a 55Ah Battery. So the values are physicaly impossible.
The “UPS Energy Loss” Consumer is the Delta between “UPS Energy to Batttery” and “UPS Output”.
So if there would have been suddently 15kWh going into the battery, but only the normal 2.3kWh out of it, this would have exploded as well.
Here is the “UPS Energy to Battery” sensor for the day in question:
.
.
Case 2: 2.5kWh from Solar Panels during the night.
The corresponding Sensor during the interesting timeframe:
So where is that Solar Energy on the Dashboard coming from??
.
.
While Investigating I found something noteworthy in an completely unrelated Sensor but during the same hour.
The Energy Values of Both Shelly Plug S that measure what goes into the UPS have dropped to 0.
Hence the “UPS Energy to Battery” Sensor also dropped to 0 and started counting upwards from there again.
I have no clue yet why this happend but its a completly unrelated Measurement so it does not serve as an explanation what happend to the Solar production.
.
.
It seems
@fridayAr Shelly 3EM 3-phases Energy sensor - #176 by fridayAr
@Rachdingue Energy integration and utility meters
Are hitting simmilar / same? Issues. But they need to speek for their experiences and implementation details themself.
.
.
Any hints / clues / ideas on-topic are very welcome.