Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit efd4370

Browse files
hhrssccrytilahti
andauthored
Add eyecare on/off to philips_eyecare_cli (rytilahti#631)
* Add eyecare on/off to philips_eyecare_cli * use imperative for command docstrings Co-authored-by: Teemu R. <[email protected]>
1 parent b905757 commit efd4370

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

miio/philips_eyecare_cli.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,20 @@ def off(dev: miio.PhilipsEyecare):
104104
click.echo("Power off: %s" % dev.off())
105105

106106

107+
@cli.command()
108+
@pass_dev
109+
def eyecare_on(dev: miio.PhilipsEyecare):
110+
"""Turn eyecare on."""
111+
click.echo("Eyecare on: %s" % dev.eyecare_on())
112+
113+
114+
@cli.command()
115+
@pass_dev
116+
def eyecare_off(dev: miio.PhilipsEyecare):
117+
"""Turn eyecare off."""
118+
click.echo("Eyecare off: %s" % dev.eyecare_off())
119+
120+
107121
@cli.command()
108122
@click.argument("level", callback=validate_brightness, required=True)
109123
@pass_dev

0 commit comments

Comments
 (0)