increase robustness, when something upstream fails (#19493)
parent
5a4e6bbb07
commit
0b22880f22
|
@ -92,7 +92,12 @@ class IPMAWeather(WeatherEntity):
|
|||
async def async_update(self):
|
||||
"""Update Condition and Forecast."""
|
||||
with async_timeout.timeout(10, loop=self.hass.loop):
|
||||
self._condition = await self._station.observation()
|
||||
_new_condition = await self._station.observation()
|
||||
if _new_condition is None:
|
||||
_LOGGER.warning("Could not update weather conditions")
|
||||
return
|
||||
self._condition = _new_condition
|
||||
|
||||
_LOGGER.debug("Updating station %s, condition %s",
|
||||
self._station.local, self._condition)
|
||||
self._forecast = await self._station.forecast()
|
||||
|
|
Loading…
Reference in New Issue