Fixes an AirVisual bug where response data is missing (#16673)
This commit is contained in:
parent
25712f16b3
commit
27d50d388f
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue