Skip to content

Commit

Permalink
Add water volume setting (s5 max)
Browse files Browse the repository at this point in the history
  • Loading branch information
rytilahti committed Jul 25, 2020
1 parent eef6b36 commit 141924f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions miio/vacuum.py
Expand Up @@ -70,6 +70,15 @@ class FanspeedE2(enum.Enum):
Turbo = 100


class WaterFlow:
"""Strength """

Minimum = 200
Low = 201
High = 202
Maximum = 203


ROCKROBO_V1 = "rockrobo.vacuum.v1"


Expand Down Expand Up @@ -656,6 +665,16 @@ def split_segment(self):
raise NotImplementedError("unknown parameters")
# return self.send("split_segment")

@command()
def waterflow(self) -> WaterFlow:
"""Get water flow setting."""
return WaterFlow(self.send("get_water_box_custom_mode")[0])

@command(click.argument("waterflow", type=WaterFlow))
def set_waterflow(self, waterflow: WaterFlow):
"""Set water flow setting."""
return self.send("set_water_box_custom_mode", [waterflow.value])

@classmethod
def get_device_group(cls):
@click.pass_context
Expand Down

0 comments on commit 141924f

Please sign in to comment.