Skip to content

Commit

Permalink
Vacuum: Add water volume setting (s5 max) (#773)
Browse files Browse the repository at this point in the history
* Add water volume setting (s5 max)

* Fix docstring
  • Loading branch information
rytilahti authored Jul 27, 2020
1 parent eef6b36 commit f931d3a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions miio/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ class FanspeedE2(enum.Enum):
Turbo = 100


class WaterFlow:
"""Water flow strength on s5 max. """

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 f931d3a

Please sign in to comment.