Skip to content

Commit

Permalink
Fix error sensors for wash devices (issue #629)
Browse files Browse the repository at this point in the history
  • Loading branch information
ollo69 committed Jan 30, 2024
1 parent 45a6a12 commit 71eac96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions custom_components/smartthinq_sensors/wideq/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
"LOCK": StateOptions.ON,
"INITIAL_BIT_OFF": StateOptions.OFF,
"INITIAL_BIT_ON": StateOptions.ON,
"STANDBY_OFF": StateOptions.OFF,
"STANDBY_ON": StateOptions.ON,
"@WM_EDD_REFILL_W": StateOptions.OFF,
"IGNORE": StateOptions.NONE,
"NONE": StateOptions.NONE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,8 @@ def _get_error(self):
"""Get current error."""
if not self._error:
keys = self._getkeys(["Error", "error"])
error = self.lookup_reference(keys, ref_key="title")
if (error := self.lookup_enum(keys)) is None:
error = self.lookup_reference(keys, ref_key="title")
if not error:
self._error = STATE_WM_ERROR_OFF
else:
Expand Down

0 comments on commit 71eac96

Please sign in to comment.