Closed AleXSR700 closed 7 months ago
Hey there @dgomes, mind taking a look at this issue as it has been labeled with an integration (integration
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
integration documentation integration source (message by IssueLinks)
You may want to put a thumbs up at #88940
In Addition, I suggest the option ( or default behavior? ) to interprete the „unavailable“ State of a sensor as decimal 0. In combination with the hourly update, It would resolve dozens of issues. Many problems are related to source sensors that go offline if not powered (solar inverters, Wifi Plugs, etc.)
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
The problem
The rieman sum integration only updates on changes of the source sensors' value, which may seemed like the correct approach, but leads to an incorrect and illogical value.
The Rieman sum usually creates a total energy value in Wh or kWh, i.e. an hour based value.
When the source sensor remains at a constant value, then the integrattion never updates and reports 0 Wh of consumption, even if the source sensor were to consume e.g. 1 kWh.
Here is an example where a sensor constantly consumes 33.5 W which leads to a 0 Wh consumption according to the Rieman sum and hence according to all Energy readings in HA (e.g. Energy dashboard).
A much better approach would be to update at least once per hour (as it is an hourly integration) e.g. at 1 sec past the hour, or let the user define a minimum update interval. Alternative of coure being the default 1 min update period which updates the value but does not write to the database unless the value changes.
What version of Home Assistant Core has the issue?
2023-10.3
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Integration - Riemann sum integral
Link to integration documentation on our website
https://www.home-assistant.io/integrations/integration/
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response