From 87e087b357fd51f352dc74a806591c08063ac5e6 Mon Sep 17 00:00:00 2001 From: Andrew Marks Date: Thu, 23 Jul 2020 09:44:30 -0400 Subject: [PATCH] Improve handling of stale error state --- sharkiq/sharkiq.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sharkiq/sharkiq.py b/sharkiq/sharkiq.py index 53267c0..22c88b0 100644 --- a/sharkiq/sharkiq.py +++ b/sharkiq/sharkiq.py @@ -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