mirror of
https://github.com/home-assistant/core.git
synced 2026-09-03 02:34:57 -05:00
Buffer TImeoutError in Flo (#109675)
This commit is contained in:
@@ -46,7 +46,7 @@ class FloDeviceDataUpdateCoordinator(DataUpdateCoordinator): # pylint: disable=
|
||||
await self._update_device()
|
||||
await self._update_consumption_data()
|
||||
self._failure_count = 0
|
||||
except RequestError as error:
|
||||
except (RequestError, TimeoutError) as error:
|
||||
self._failure_count += 1
|
||||
if self._failure_count > 3:
|
||||
raise UpdateFailed(error) from error
|
||||
|
||||
@@ -90,7 +90,7 @@ async def test_device(
|
||||
|
||||
# test error sending device ping
|
||||
with patch(
|
||||
"homeassistant.components.flo.device.FloDeviceDataUpdateCoordinator.send_presence_ping",
|
||||
"aioflo.presence.Presence.ping",
|
||||
side_effect=RequestError,
|
||||
), pytest.raises(UpdateFailed):
|
||||
# simulate 4 updates failing
|
||||
|
||||
Reference in New Issue
Block a user