From 35f1f45d3b58baaea4f2b62c22fdacb9e86413c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Gr=C3=BCter?= Date: Thu, 2 Nov 2023 10:51:02 +0100 Subject: [PATCH] Don't try to update activities if http call failed --- custom_components/unfoldedcircle/remote.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/custom_components/unfoldedcircle/remote.py b/custom_components/unfoldedcircle/remote.py index 1b40e4b..0a6736b 100644 --- a/custom_components/unfoldedcircle/remote.py +++ b/custom_components/unfoldedcircle/remote.py @@ -63,7 +63,9 @@ async def async_update(self) -> None: _LOGGER.exception( "Error retrieving data from UnfoldedCircle device %s", self.name ) - self._attr_activity_list = [a["name"]["en"] for a in activities] + self._available = False + else: + self._attr_activity_list = [a["name"]["en"] for a in activities] async def async_send_command(self, command, **kwargs) -> None: """Send commands to a device."""