From ca95ea094ab65ce9db66cbeaf66c97d83cc1b934 Mon Sep 17 00:00:00 2001 From: Felix Eckhofer Date: Fri, 5 Jun 2020 13:42:09 +0200 Subject: [PATCH] Add support for fanspeeds of Roborock E2 (E20/E25) --- miio/vacuum.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/miio/vacuum.py b/miio/vacuum.py index 1d6f32b8b..f6f3412e9 100644 --- a/miio/vacuum.py +++ b/miio/vacuum.py @@ -60,6 +60,11 @@ class FanspeedV2(enum.Enum): Turbo = 104 Gentle = 105 +class FanspeedE2(enum.Enum): + Silent = 50 + Standard = 68 + Strong = 79 + Max = 100 ROCKROBO_V1 = "rockrobo.vacuum.v1" @@ -463,6 +468,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