Fixes an AirVisual bug where response data is missing (#16673)
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…
Reference in New Issue