-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix time-based statistics (peaks, incorrect values) #124644
Fix time-based statistics (peaks, incorrect values) #124644
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Hey there @ThomDietrich, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
aaceacb
to
5353d9a
Compare
3712906
to
e97d61c
Compare
Hello @unfug-at-github, |
I agree. I should have at least put the fixes for the average and the changes for the "compute with only one value" functions into different requests. With the average functions it's a little harder to split things up, because these changes are somewhat depending on each other. Let me know if things need to be put into separate requests. It's my first contribution here, and I have to admit that I only read some of the how-tos after I fixed all the issues that I had with my solar management solution. |
…n values aren't changing) and provide values for statistical function even if only a single input value exists
e97d61c
to
2b0ef18
Compare
I could really use this fix from this PR, @ThomDietrich could you give an estimate on when you have time to approve this PR? |
I think this PR should try to split up more, for me as a reviewer its not clear why we exactly change what since this PR tries to solve 4 bugs, so I can't discover if this is the proper way to solve the bug. Also, there is a merge conflict. |
I have created a separate pull request that only addresses the issue of the spikes (#127268). I'll add further ones to reduce the scope of this one. |
Added another PR for the single value case #127305 |
synchronized, so that buffer updates no longer interfere with statistical computations
added test for sensor updates before database load finishes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @unfug-at-github,
When attempting to inspect the commits of your pull request for CLA signature status among all authors we encountered commit(s) which were not linked to a GitHub account, thus not allowing us to determine their status(es).
The commits that are missing a linked GitHub account are the following:
3bfdebee41ca6e7af537b065bd5218a194aef8a3
- This commit has something that looks like an email address (dr.dirk.schmidt@web.de). Maybe try linking that to GitHub?.
Unfortunately, we are unable to accept this pull request until this situation is corrected.
Here are your options:
-
If you had an email address set for the commit that simply wasn't linked to your GitHub account you can link that email now and it will retroactively apply to your commits. The simplest way to do this is to click the link to one of the above commits and look for a blue question mark in a blue circle in the top left. Hovering over that bubble will show you what email address you used. Clicking on that button will take you to your email address settings on GitHub. Just add the email address on that page and you're all set. GitHub has more information about this option in their help center.
-
If you didn't use an email address at all, it was an invalid email, or it's one you can't link to your GitHub, you will need to change the authorship information of the commit and your global Git settings so this doesn't happen again going forward. GitHub provides some great instructions on how to change your authorship information in their help center.
- If you only made a single commit you should be able to run
(substituting "Author Name" and "
git commit --amend --author="Author Name <email@address.com>"
email@address.com
" for your actual information) to set the authorship information. - If you made more than one commit and the commit with the missing authorship information is not the most recent one you have two options:
- You can re-create all commits missing authorship information. This is going to be the easiest solution for developers that aren't extremely confident in their Git and command line skills.
- You can use this script that GitHub provides to rewrite history. Please note: this should be used only if you are very confident in your abilities and understand its impacts.
- Whichever method you choose, I will come by to re-check the pull request once you push the fixes to this branch.
- If you only made a single commit you should be able to run
We apologize for this inconvenience, especially since it usually bites new contributors to Home Assistant. We hope you understand the need for us to protect ourselves and the great community we all have built legally. The best thing to come out of this is that you only need to fix this once and it benefits the entire Home Assistant and GitHub community.
Thanks, I look forward to checking this PR again soon! ❤️
I created a new PR to fix the async issues in general #128796 |
Fixing issues with time-based statistics (peaks, incorrect values) and provide values for statistical function even if only a single input value exists
Breaking change
Proposed change
The statistics functions has issues with the time based functions:
The changes will fix the above mentioned issues. To do so, they add a new parameter "refresh interval" that allows to updated the computed averages even if the input states are not changing.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: