Skip to content

Commit 5312237

Browse files
Merge pull request #515 from WillCodeForCats/code-quality
Catch ModbusIOException from setup
2 parents 9535981 + 6a49422 commit 5312237

File tree

1 file changed

+1
-1
lines changed
  • custom_components/solaredge_modbus_multi

1 file changed

+1
-1
lines changed

custom_components/solaredge_modbus_multi/hub.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ async def async_refresh_modbus_data(self) -> bool:
318318
async with self._lock:
319319
await self._async_init_solaredge()
320320

321-
except ConnectionException as e:
321+
except (ConnectionException, ModbusIOException) as e:
322322
self.disconnect()
323323
raise HubInitFailed(f"Setup failed: {e}")
324324

0 commit comments

Comments
 (0)