add @pass_dev to hsv, adjust ranges (#70)

* add @pass_dev to hsv command, it was always broken

* Hue goes up to 360, saturation and value are up to 100(%)
This commit is contained in:
Teemu R 2017-08-03 22:13:56 +02:00 committed by GitHub
parent b7a7fdbfaf
commit 10544004cc

View File

@ -136,9 +136,10 @@ def temperature(dev, value):
@cli.command()
@click.argument("h", type=click.IntRange(0, 255), default=None)
@click.argument("s", type=click.IntRange(0, 255), default=None)
@click.argument("v", type=click.IntRange(0, 255), default=None)
@click.argument("h", type=click.IntRange(0, 360), default=None)
@click.argument("s", type=click.IntRange(0, 100), default=None)
@click.argument("v", type=click.IntRange(0, 100), default=None)
@pass_dev
def hsv(dev, h, s, v):
"""Get or set color in HSV. (Bulb only)"""
if h is None or s is None or v is None: