Skip to content

Commit

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

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

Expand Down

0 comments on commit ca95ea0

Please sign in to comment.