mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix update after network error (#27444)
This commit is contained in:
parent
64f9ecbac9
commit
652bf54044
@ -148,6 +148,9 @@ class AirlyAirQuality(AirQualityEntity):
|
|||||||
"""Get the data from Airly."""
|
"""Get the data from Airly."""
|
||||||
await self.airly.async_update()
|
await self.airly.async_update()
|
||||||
|
|
||||||
|
if self.airly.data:
|
||||||
|
self.data = self.airly.data
|
||||||
|
|
||||||
self._pm_10 = self.data[ATTR_API_PM10]
|
self._pm_10 = self.data[ATTR_API_PM10]
|
||||||
self._pm_2_5 = self.data[ATTR_API_PM25]
|
self._pm_2_5 = self.data[ATTR_API_PM25]
|
||||||
self._aqi = self.data[ATTR_API_CAQI]
|
self._aqi = self.data[ATTR_API_CAQI]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user