diff --git a/custom_components/solaredge_modbus_multi/hub.py b/custom_components/solaredge_modbus_multi/hub.py index c15c13fd..a7a4cff3 100644 --- a/custom_components/solaredge_modbus_multi/hub.py +++ b/custom_components/solaredge_modbus_multi/hub.py @@ -421,6 +421,10 @@ async def async_refresh_modbus_data(self) -> bool: self.disconnect() raise DataUpdateFailed(f"Connection failed: {e}") + except asyncio.TimeoutError as e: + self.disconnect() + raise DataUpdateFailed(f"Modbus timeout: {e}") + if not self._keep_modbus_open: self.disconnect()