Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved fanspeed mapping for Roborock S7 MaxV #1454

Merged
merged 5 commits into from
Jul 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions miio/integrations/vacuum/roborock/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ class FanspeedS7(FanspeedEnum):
Turbo = 104


class FanspeedS7_Maxv(FanspeedEnum):
Silent = 101
Standard = 102
Medium = 103
Turbo = 104
Max = 108


class WaterFlow(enum.Enum):
"""Water flow strength on s5 max."""

Expand All @@ -115,7 +123,7 @@ class MopMode(enum.Enum):


class MopIntensity(enum.Enum):
"""Mop scrub intensity on S7."""
"""Mop scrub intensity on S7 + S7MAXV."""

Close = 200
Mild = 201
Expand All @@ -132,7 +140,7 @@ class CarpetCleaningMode(enum.Enum):


class DustCollectionMode(enum.Enum):
"""Auto emptying mode (S7 only)"""
"""Auto emptying mode (S7 + S7MAXV only)"""

Smart = 0
Quick = 1
Expand Down Expand Up @@ -185,6 +193,7 @@ class DustCollectionMode(enum.Enum):

AUTO_EMPTY_MODELS = [
ROCKROBO_S7,
ROCKROBO_S7_MAXV,
]


Expand Down Expand Up @@ -664,6 +673,8 @@ def _enum_as_dict(cls):
fanspeeds = FanspeedE2
elif self.model == ROCKROBO_S7:
fanspeeds = FanspeedS7
elif self.model == ROCKROBO_S7_MAXV:
fanspeeds = FanspeedS7_Maxv
else:
fanspeeds = FanspeedV2

Expand Down