From f5f4bbe351c9d55cf91e1ea19106f872eb2a7dba Mon Sep 17 00:00:00 2001 From: Jon Benson Date: Sat, 20 Jan 2018 08:38:18 +1100 Subject: [PATCH] Modified to support zoned cleaning mode of Roborock S50. (#160) --- miio/vacuumcontainers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/miio/vacuumcontainers.py b/miio/vacuumcontainers.py index d11aee07a..b7a213c06 100644 --- a/miio/vacuumcontainers.py +++ b/miio/vacuumcontainers.py @@ -151,6 +151,9 @@ def state(self) -> str: 12: 'Error', 13: 'Unknown 13', 14: 'Updating', + 15: 'Unknown 15', + 16: 'Unknown 16', + 17: 'Zoned cleaning', } return states[int(self.state_code)] @@ -208,7 +211,8 @@ def is_on(self) -> bool: """True if device is currently cleaning (either automatic, manual or spot).""" return self.state_code == 5 or \ self.state_code == 7 or \ - self.state_code == 11 + self.state_code == 11 or \ + self.state_code == 17 @property def got_error(self) -> bool: