-
-
Notifications
You must be signed in to change notification settings - Fork 34.1k
Make AirVisual platform async + other adjustments #14943
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
Conversation
_LOGGER.error( | ||
"Can't retrieve data for location: %s (%s)", location, | ||
err) | ||
self.city = None |
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.
Why would you reset all these things ? If something is misconfigured, we should not just try to get the nearest city. We should just not update and mark as available=False.
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.
Great point; not sure what I was thinking there.
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.
Let me know if you're okay with the method I use in the latest commit.
perfect. |
Description:
This PR makes the following changes to AirVisual:
pyairvisual
) to 1.0.0.radius
configuration parameter (no longer used in the AirVisual API).scan_interval
.BREAKING CHANGES
First, the
radius
configuration parameter no longer does anything and has been removed. This won't negatively impact any existing integrations, but it should still be noted.Second, this PR will modify the unique IDs for each sensor to correctly include the locale. New unique IDs will now include
_us_
and_cn_
– example:Related issue (if applicable): N/A
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#5534
Example entry for
configuration.yaml
(if applicable):Checklist:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.