Skip to content

Commit

Permalink
Timeout in refresh as DataUpdateFailed
Browse files Browse the repository at this point in the history
  • Loading branch information
WillCodeForCats committed Jul 30, 2023
1 parent 2cf6941 commit 2c2b16f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/solaredge_modbus_multi/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 2c2b16f

Please sign in to comment.