Add reboot command to restart the device (#129)

This commit is contained in:
Teemu R
2018-09-08 16:11:58 +02:00
committed by GitHub
parent d72b47c0b7
commit 345216e245
2 changed files with 19 additions and 0 deletions

View File

@@ -255,5 +255,13 @@ def off(plug):
plug.turn_off()
@cli.command()
@click.option("--delay", default=1)
@pass_dev
def reboot(plug, delay):
"""Reboot the device."""
click.echo("Rebooting the device..")
plug.reboot(delay)
if __name__ == "__main__":
cli()