From 3ac2106eb8dd3a1a2dc2c687cd7855d8f888f4c6 Mon Sep 17 00:00:00 2001 From: Cyr-ius <1258123+cyr-ius@users.noreply.github.com> Date: Fri, 4 Aug 2023 09:25:51 +0200 Subject: [PATCH] Fix freebox enumerate raid disks (#97696) --- homeassistant/components/freebox/router.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/freebox/router.py b/homeassistant/components/freebox/router.py index 4a9c22847ae..122242f1959 100644 --- a/homeassistant/components/freebox/router.py +++ b/homeassistant/components/freebox/router.py @@ -161,10 +161,13 @@ class FreeboxRouter: async def _update_raids_sensors(self) -> None: """Update Freebox raids.""" # None at first request - fbx_raids: list[dict[str, Any]] = await self._api.storage.get_raids() or [] - - for fbx_raid in fbx_raids: - self.raids[fbx_raid["id"]] = fbx_raid + try: + fbx_raids: list[dict[str, Any]] = await self._api.storage.get_raids() or [] + except HttpRequestError: + _LOGGER.warning("Unable to enumerate raid disks") + else: + for fbx_raid in fbx_raids: + self.raids[fbx_raid["id"]] = fbx_raid async def update_home_devices(self) -> None: """Update Home devices (alarm, light, sensor, switch, remote ...)."""