mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Fixes an AirVisual bug where response data is missing (#16673)
This commit is contained in:
parent
25712f16b3
commit
27d50d388f
@ -281,7 +281,7 @@ class AirVisualData:
|
||||
_LOGGER.debug("New data retrieved: %s", resp)
|
||||
|
||||
self.pollution_info = resp['current']['pollution']
|
||||
except AirVisualError as err:
|
||||
except (KeyError, AirVisualError) as err:
|
||||
if self.city and self.state and self.country:
|
||||
location = (self.city, self.state, self.country)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user