From f92e80f358ffe200b64a723dd30340c6ef801440 Mon Sep 17 00:00:00 2001 From: Felix Eckhofer Date: Sat, 6 Jun 2020 23:12:15 +0200 Subject: [PATCH] Add support for fanspeeds of Roborock E2 (E20/E25) (#718) --- miio/vacuum.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/miio/vacuum.py b/miio/vacuum.py index 1d6f32b8b..6450e6b9f 100644 --- a/miio/vacuum.py +++ b/miio/vacuum.py @@ -61,6 +61,14 @@ class FanspeedV2(enum.Enum): Gentle = 105 +class FanspeedE2(enum.Enum): + # Original names from the app: Silent, Standard, Strong, Max + Silent = 50 + Standard = 68 + Medium = 79 + Turbo = 100 + + ROCKROBO_V1 = "rockrobo.vacuum.v1" @@ -463,6 +471,8 @@ def _autodetect_model(self): self._fanspeeds = FanspeedV2 else: self._fanspeeds = FanspeedV1 + elif info.model == "roborock.vacuum.e2": + self._fanspeeds = FanspeedE2 else: self._fanspeeds = FanspeedV2