mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-01-09 22:37:08 +00:00
Fix error code naming
This commit is contained in:
parent
cf3f3166bc
commit
1bd8d54faf
@ -142,7 +142,7 @@ class Vacuum(SmartModule):
|
|||||||
"""Set error code after update."""
|
"""Set error code after update."""
|
||||||
errors = self._vac_status.get("err_status")
|
errors = self._vac_status.get("err_status")
|
||||||
if errors is None:
|
if errors is None:
|
||||||
self._error = ErrorCode.Ok
|
self._error_code = ErrorCode.Ok
|
||||||
return
|
return
|
||||||
|
|
||||||
if len(errors) > 1:
|
if len(errors) > 1:
|
||||||
@ -152,9 +152,9 @@ class Vacuum(SmartModule):
|
|||||||
|
|
||||||
error = errors.pop(0)
|
error = errors.pop(0)
|
||||||
try:
|
try:
|
||||||
self._error = ErrorCode(error)
|
self._error_code = ErrorCode(error)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
self._error = ErrorCode.Unknown
|
self._error_code = ErrorCode.Unknown
|
||||||
|
|
||||||
def query(self) -> dict:
|
def query(self) -> dict:
|
||||||
"""Query to execute during the update cycle."""
|
"""Query to execute during the update cycle."""
|
||||||
@ -206,7 +206,7 @@ class Vacuum(SmartModule):
|
|||||||
@property
|
@property
|
||||||
def error(self) -> ErrorCode:
|
def error(self) -> ErrorCode:
|
||||||
"""Return error."""
|
"""Return error."""
|
||||||
return self._error
|
return self._error_code
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def fan_speed_preset(self) -> str:
|
def fan_speed_preset(self) -> str:
|
||||||
|
Loading…
Reference in New Issue
Block a user