From 6a49422c56c20b00823188256d8ba8086066f07a Mon Sep 17 00:00:00 2001 From: WillCodeForCats <48533968+WillCodeForCats@users.noreply.github.com> Date: Tue, 23 Jan 2024 09:51:20 -0800 Subject: [PATCH] Catch ModbusIOException from setup --- custom_components/solaredge_modbus_multi/hub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/solaredge_modbus_multi/hub.py b/custom_components/solaredge_modbus_multi/hub.py index 3a4488eb..b381dd50 100644 --- a/custom_components/solaredge_modbus_multi/hub.py +++ b/custom_components/solaredge_modbus_multi/hub.py @@ -318,7 +318,7 @@ async def async_refresh_modbus_data(self) -> bool: async with self._lock: await self._async_init_solaredge() - except ConnectionException as e: + except (ConnectionException, ModbusIOException) as e: self.disconnect() raise HubInitFailed(f"Setup failed: {e}")