Skip to content

Commit 50e040c

Browse files
authored
Merge pull request #70 from erikkastelec/dev
Fixed bug in request exception handling #66
2 parents 7ceb201 + 630bcdd commit 50e040c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

custom_components/wemportal/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"documentation": "https://github.com/erikkastelec/hass-WEM-Portal",
55
"issue_tracker": "https://github.com/erikkastelec/hass-WEM-Portal/issues",
66
"dependencies": [],
7-
"version": "1.5.6",
7+
"version": "1.5.7",
88
"codeowners": [
99
"@erikkastelec"
1010
],

custom_components/wemportal/wemportalapi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def get_parameters(self):
310310
"https://www.wemportal.com/app/EventType/Read", data=data
311311
)
312312
except WemPortalError as exc:
313-
if isinstance(exc, reqs.exceptions.HTTPError) and exc.response.status_code == 400:
313+
if isinstance(exc.__cause__, reqs.exceptions.HTTPError) and exc.__cause__.response.status_code == 400:
314314
_LOGGER.error("Could not fetch parameters for device %s for index %s and type %s", device_id, values["Index"], values["Type"])
315315
delete_candidates.append((values["Index"], values["Type"]))
316316
continue

0 commit comments

Comments
 (0)