-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
AirVisual unable to retrieve data at this location #9923
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
Comments
Your configuration doesn't mention whether you're using latitude/longitude or city/state/country. I assume that since you've blanked them, you're using latitude/longitude? Without knowing anything further, I'm guessing that you're inputting a latitude/longitude that AirVisual can't consistently resolve for some reason (I've experienced this at times with their API). If you're willing to input the location information directly, I just tried this config and it worked as expected – give it a shot: sensor:
- platform: airvisual
api_key: !secret airvisual_key
monitored_conditions:
- us
radius: 500
city: lodsworth
state: west-sussex
country: uk |
Thanks for the quick suggestion. My long and lat are currently set elsewhere as mentioned in the docs:
I will add a location as you have suggested and will report back if it does the trick. |
Thanks, @scottsweb. Even if it does work, it would still be interesting to debug why your coordinates aren't working. I'm available in the forums, so feel free to shoot me a DM! |
@scottsweb: Got it; will be on the lookout for your DM! |
Home Assistant release (
hass --version
):0.55.1
Python release (
python3 --version
):3.4.2
Component/platform:
AirVisual
Description of problem:
After starting Home Assistant for a short while the AirVisual sensors starts to error (all is OK on boot). All sensors begin returning unknown states. I noticed the issue began with 0.55.0.
At first I thought it might be an issue with their API, but it seems odd that it works for a short time.
Error log:
2017-10-17 15:51:18 ERROR (MainThread) [homeassistant.components.sensor.airvisual] Unable to retrieve data on this location: {'pollution_info': {'maincn': 'o3', 'aqicn': 13, 'ts': '2017-10-17T11:00:00.000Z', 'mainus': 'o3', 'aqius': 17}, 'state': 'West Sussex', 'latitude': [blanked], 'longitude': [blanked], 'city': 'Lodsworth', '_client': <pyairvisual.client.Client object at 0x6c812030>, 'country': 'United Kingdom', '_throttle': {1842766864: [<_thread.lock object at 0x6c84a968>, datetime.datetime(2017, 10, 17, 14, 40, 58, 195423, tzinfo=<UTC>)]}, '_radius': 500}
Expected:
AirQuality should report the correct values for my location.
Problem-relevant
configuration.yaml
entries and steps to reproduce:The text was updated successfully, but these errors were encountered: