Skip to content

Commit

Permalink
Add preliminary Roborock M1S / Mi Robot S1 support (#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi authored Aug 14, 2019
1 parent df86a9b commit f33bc0f
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions miio/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,51 @@ def set_carpet_mode(self, enabled: bool, stall_time: int = 10,
}
return self.send("set_carpet_mode", [data])[0] == 'ok'

@command()
def stop_zoned_clean(self):
"""Stop cleaning a zone."""
return self.send("stop_zoned_clean")

@command()
def stop_segment_clean(self):
"""Stop cleaning a segment."""
return self.send("stop_segment_clean")

@command()
def resume_segment_clean(self):
"""Resuming cleaning a segment."""
return self.send("resume_segment_clean")

@command(
click.argument("segments", type=LiteralParamType(), required=True),
)
def segment_clean(self, segments: List):
"""Clean segments.
:param List segments: List of segments to clean: [16,17,18]"""
return self.send("app_segment_clean", segments)

@command()
def get_room_mapping(self):
"""Retrieves a list of segments."""
return self.send("get_room_mapping")

@command()
def get_segment_status(self):
"""Get the status of a segment."""
return self.send("get_segment_status")

def name_segment(self):
raise NotImplementedError("unknown parameters")
# return self.send("name_segment")

def merge_segment(self):
raise NotImplementedError("unknown parameters")
# return self.send("merge_segment")

def split_segment(self):
raise NotImplementedError("unknown parameters")
# return self.send("split_segment")

@classmethod
def get_device_group(cls):

Expand Down

0 comments on commit f33bc0f

Please sign in to comment.