mirror of https://github.com/simbaja/ha_gehome.git
Improve handling of stale error state
This commit is contained in:
parent
d9f0ba4c5d
commit
87e087b357
|
@ -115,7 +115,7 @@ class SharkVacuumEntity(StateVacuumEntity):
|
|||
def error_code(self) -> Optional[int]:
|
||||
"""Error code or None"""
|
||||
# Errors remain for a while, so we should only show an error if the device is stopped
|
||||
if self.sharkiq.get_property_value(Properties.OPERATING_MODE) == OperatingModes.STOP:
|
||||
if self.sharkiq.get_property_value(Properties.OPERATING_MODE) == OperatingModes.STOP and not self.is_docked:
|
||||
return self.sharkiq.get_property_value(Properties.ERROR_CODE)
|
||||
else:
|
||||
return None
|
||||
|
|
Loading…
Reference in New Issue