Skip to content

Commit

Permalink
Roborock: Mark Q Revo as having a mop.
Browse files Browse the repository at this point in the history
And make this declarative.
  • Loading branch information
SLaks committed Mar 17, 2024
1 parent 0665f5b commit 2575c31
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions miio/integrations/roborock/vacuum/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@
ROCKROBO_Q_REVO,
]

MODELS_WITH_MOP = [ROCKROBO_S7, ROCKROBO_S7_MAXV, ROCKROBO_Q_REVO]


class RoborockVacuum(Device):
"""Main class for roborock vacuums (roborock.vacuum.*)."""
Expand Down Expand Up @@ -981,7 +983,7 @@ def set_mop_mode(self, mop_mode: MopMode):
@command()
def mop_intensity(self) -> MopIntensity:
"""Get mop scrub intensity setting."""
if self.model not in [ROCKROBO_S7, ROCKROBO_S7_MAXV]:
if self.model not in MODELS_WITH_MOP:
raise UnsupportedFeatureException(
"Mop scrub intensity not supported by %s", self.model
)
Expand All @@ -991,7 +993,7 @@ def mop_intensity(self) -> MopIntensity:
@command(click.argument("mop_intensity", type=EnumType(MopIntensity)))
def set_mop_intensity(self, mop_intensity: MopIntensity):
"""Set mop scrub intensity setting."""
if self.model not in [ROCKROBO_S7, ROCKROBO_S7_MAXV]:
if self.model not in MODELS_WITH_MOP:
raise UnsupportedFeatureException(
"Mop scrub intensity not supported by %s", self.model
)
Expand Down

0 comments on commit 2575c31

Please sign in to comment.