Skip to content

Commit

Permalink
Use pause instead of stop for home command (#411)
Browse files Browse the repository at this point in the history
This extends the support to more vacuum models, tested to work on gen1 vacuum as previously.
  • Loading branch information
rytilahti authored Nov 16, 2018
1 parent c730ea8 commit ef28fdb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions miio/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ def start(self):

@command()
def stop(self):
"""Stop cleaning."""
"""Stop cleaning.
Note, prefer 'pause' instead of this for wider support.
Some newer vacuum models do not support this command.
"""
return self.send("app_stop")

@command()
Expand All @@ -70,7 +74,7 @@ def pause(self):
@command()
def home(self):
"""Stop cleaning and return home."""
self.send("app_stop")
self.send("app_pause")
return self.send("app_charge")

@command(
Expand Down

0 comments on commit ef28fdb

Please sign in to comment.