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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-level AirVisual API calls #34903
Auto-level AirVisual API calls #34903
Conversation
fb2fc60
to
05af354
Compare
I have updated to 110 beta0. |
@BradleyFord This is an open PR, which implements auto-leveling. Since it is open, it is not part of 0.110. |
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.
Looks good!
@bachya @MartinHjelmare Should we add this to a patch release? As I've seen quite a few people running into the limits... ? |
Ok with me. |
Proposed change
Users were reporting that monitoring multiple geographies with the same API key overran their free API limits. In the past, this was resolved by setting high
scan_interval
values, but since this was removed in #32072, users had no route forward.This PR adds "self-leveling" to the API: the more clients that use the same API key, the greater the interval between API calls. The values are selected to leave plenty of buffer for the typical "free tier" use case.
Type of change
Example entry for
configuration.yaml
:# Example configuration.yaml
Additional information
Checklist
black --fast 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
..coveragerc
.The integration reached or maintains the following Integration Quality Scale: