Remove no-longer-needed invalid API key monitor for OpenUV #85573
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed change
OpenUV has a new API method that reliably returns the API's current status. This allows us to remove the "track how many errors we receive to see if we're looking at an invalid API key or service disruption" logic introduced in #79691. Doing so fixes a bug in which the integration will, upon config entry setup, attempt a re-setup every 1-2 minutes and spam the logs if its API key has reached its limit (#85496).
There is one quirk to keep in mind. In OpenUV, an
HTTP 403
response indicates one of two conditions:Unfortunately, we can't deduce which is which when we receive an
HTTP 403
(there is an API endpoint to determine how many calls a user has made per day/month, but there is no way to know what that particular user's call limit is 🤦🏻). So, we follow this strategy:HTTP 403
will trigger a re-auth flow.pyopenuv
changelog: https://github.com/bachya/pyopenuv/releases/tag/2023.01.0pyopenuv
diff: bachya/pyopenuv@2022.04.0...2023.01.0 (large diff, but the vast majority of it is repo maintenance)Type of change
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
.To help with the load of incoming pull requests: