Skip to content

Commit

Permalink
Additional logging to aid debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
cdpuk committed Jan 30, 2024
1 parent 896345c commit 6c93f78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/givenergy_local/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@ async def _async_update_data(self) -> Plant:
full_refresh=self.require_full_refresh, retries=2
)
except Exception as err:
_LOGGER.error("Closing connection due to expected error: %s", err)
await self.client.close()
raise UpdateFailed(f"Error communicating with inverter: {err}") from err
raise UpdateFailed("Connection closed due to expected error") from err

if not self._is_data_valid(plant):
attempt += 1
Expand Down

0 comments on commit 6c93f78

Please sign in to comment.