Skip to content

Commit

Permalink
Add support for fanspeeds of Roborock E2 (E20/E25) (#718)
Browse files Browse the repository at this point in the history
  • Loading branch information
tribut authored Jun 6, 2020
1 parent dd0255c commit f92e80f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions miio/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"


Expand Down Expand Up @@ -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

Expand Down

0 comments on commit f92e80f

Please sign in to comment.