Open EDelsman opened 1 month ago
Hey there @thomdietrich, mind taking a look at this issue as it has been labeled with an integration (statistics
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
statistics documentation statistics source (message by IssueLinks)
@EDelsman I think the screenshots show the state of the statistics sensor? Can you also share screenshots which show the state of the input sensor?
They are both there: the top is the original with W, the below is the stats without.
I found the issue which is that it's only calculating the attributes after the first change from the source sensor. So with no update from your solar panels = no adding of the unit. There is a PR coming but not entirely sure we would bring that into this release.
Not bringing it in the release is fine by me, and I understand the reasoning behind it. But sensors staying without updates because they do not change is frequent in HA. So I expect a lot of people will be having these new repair messages and come with questions when it is released today.
There has been made a PR to not raise for these events. So the repairs will not be seen for people upgrading after release. I was more expressing in the underlying issue which will not be addressed during this release.
The problem
The source sensor for a statistics sensor has unit W. However, as it is solar production, at night there's no data in the time window. This causes the statistics sensor to have no unit, which in turn results in a repair notice after each reboot at night.
What version of Home Assistant Core has the issue?
2024.10.0b6
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
statistics
Link to integration documentation on our website
https://www.home-assistant.io/integrations/statistics/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
The screenshot of the statistics sensor and the source sensor showing the graph and the attribute: