mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Buffer JsonDecodeError in Flo (#109767)
This commit is contained in:
parent
b7284b92ac
commit
13bc018e23
@ -7,6 +7,7 @@ from typing import Any
|
||||
|
||||
from aioflo.api import API
|
||||
from aioflo.errors import RequestError
|
||||
from orjson import JSONDecodeError
|
||||
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
|
||||
@ -46,7 +47,7 @@ class FloDeviceDataUpdateCoordinator(DataUpdateCoordinator): # pylint: disable=
|
||||
await self._update_device()
|
||||
await self._update_consumption_data()
|
||||
self._failure_count = 0
|
||||
except (RequestError, TimeoutError) as error:
|
||||
except (RequestError, TimeoutError, JSONDecodeError) as error:
|
||||
self._failure_count += 1
|
||||
if self._failure_count > 3:
|
||||
raise UpdateFailed(error) from error
|
||||
|
Loading…
x
Reference in New Issue
Block a user