Skip to content

Commit

Permalink
Merge pull request #70 from erikkastelec/dev
Browse files Browse the repository at this point in the history
Fixed bug in request exception handling #66
  • Loading branch information
erikkastelec authored May 8, 2023
2 parents 7ceb201 + 630bcdd commit 50e040c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/wemportal/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"documentation": "https://github.com/erikkastelec/hass-WEM-Portal",
"issue_tracker": "https://github.com/erikkastelec/hass-WEM-Portal/issues",
"dependencies": [],
"version": "1.5.6",
"version": "1.5.7",
"codeowners": [
"@erikkastelec"
],
Expand Down
2 changes: 1 addition & 1 deletion custom_components/wemportal/wemportalapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def get_parameters(self):
"https://www.wemportal.com/app/EventType/Read", data=data
)
except WemPortalError as exc:
if isinstance(exc, reqs.exceptions.HTTPError) and exc.response.status_code == 400:
if isinstance(exc.__cause__, reqs.exceptions.HTTPError) and exc.__cause__.response.status_code == 400:
_LOGGER.error("Could not fetch parameters for device %s for index %s and type %s", device_id, values["Index"], values["Type"])
delete_candidates.append((values["Index"], values["Type"]))
continue
Expand Down

0 comments on commit 50e040c

Please sign in to comment.