From db8b61057a375929661e72b64fca6619debeadbe Mon Sep 17 00:00:00 2001 From: hhrsscc Date: Tue, 18 Feb 2020 11:58:49 +0800 Subject: [PATCH] Add eyecare on/off to philips_eyecare_cli --- miio/philips_eyecare_cli.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/miio/philips_eyecare_cli.py b/miio/philips_eyecare_cli.py index e60cf3ea3..9d9fd39ce 100644 --- a/miio/philips_eyecare_cli.py +++ b/miio/philips_eyecare_cli.py @@ -104,6 +104,20 @@ def off(dev: miio.PhilipsEyecare): click.echo("Power off: %s" % dev.off()) +@cli.command() +@pass_dev +def eyecare_on(dev: miio.PhilipsEyecare): + """Eyecare on.""" + click.echo("Eyecare on: %s" % dev.eyecare_on()) + + +@cli.command() +@pass_dev +def eyecare_off(dev: miio.PhilipsEyecare): + """Eyecare off.""" + click.echo("Eyecare off: %s" % dev.eyecare_off()) + + @cli.command() @click.argument("level", callback=validate_brightness, required=True) @pass_dev