Skip to content

Commit

Permalink
feat: Improve inverter load method exception resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrapan committed Dec 25, 2024
1 parent f4c1e41 commit 06e7126
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/solarman/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ async def load(self):
self.modbus = PySolarmanAsync(*self.endpoint.connection, _LOGGER, AUTO_RECONNECT, TIMINGS_SOCKET_TIMEOUT)
self.device_info = await self.profile.resolve(self.get)
_LOGGER.debug(self.device_info)
except TimeoutError as e:
raise TimeoutError(f"[{self.config.serial}] Device setup timed out.") from e
except BaseException as e:
raise Exception(f"[{self.config.serial}] Device setup failed. [{format_exception(e)}]") from e

Expand Down

0 comments on commit 06e7126

Please sign in to comment.