Improve handling of stale error state

This commit is contained in:
Andrew Marks 2020-07-23 09:44:30 -04:00
parent d9f0ba4c5d
commit 87e087b357
1 changed files with 1 additions and 1 deletions

View File

@ -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