mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
increase robustness, when something upstream fails (#19493)
This commit is contained in:
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…
x
Reference in New Issue
Block a user