Skip to content

Commit

Permalink
Add annotations for ViomiVacuum (#872)
Browse files Browse the repository at this point in the history
add annotations for move, mop_mode and clean_mode
  • Loading branch information
fhempy authored Nov 28, 2020
1 parent 217e887 commit 33f025c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions miio/viomivacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def home(self):
help="number of seconds to perform this movement",
),
)
def move(self, direction, duration=0.5):
def move(self, direction: ViomiMovementDirection, duration=0.5):
"""Manual movement."""
start = time.time()
while time.time() - start < duration:
Expand All @@ -374,12 +374,12 @@ def move(self, direction, duration=0.5):
self.send("set_direction", [ViomiMovementDirection.Stop.value])

@command(click.argument("mode", type=EnumType(ViomiMode)))
def clean_mode(self, mode):
def clean_mode(self, mode: ViomiMode):
"""Set the cleaning mode."""
self.send("set_mop", [mode.value])

@command(click.argument("mop_mode", type=EnumType(ViomiMopMode)))
def mop_mode(self, mop_mode):
def mop_mode(self, mop_mode: ViomiMopMode):
self.send("set_moproute", [mop_mode.value])

@command()
Expand Down

0 comments on commit 33f025c

Please sign in to comment.