mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-23 03:33:35 +00:00
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:
parent
b7a7fdbfaf
commit
10544004cc
@ -136,9 +136,10 @@ def temperature(dev, value):
|
|||||||
|
|
||||||
|
|
||||||
@cli.command()
|
@cli.command()
|
||||||
@click.argument("h", type=click.IntRange(0, 255), default=None)
|
@click.argument("h", type=click.IntRange(0, 360), default=None)
|
||||||
@click.argument("s", type=click.IntRange(0, 255), default=None)
|
@click.argument("s", type=click.IntRange(0, 100), default=None)
|
||||||
@click.argument("v", type=click.IntRange(0, 255), default=None)
|
@click.argument("v", type=click.IntRange(0, 100), default=None)
|
||||||
|
@pass_dev
|
||||||
def hsv(dev, h, s, v):
|
def hsv(dev, h, s, v):
|
||||||
"""Get or set color in HSV. (Bulb only)"""
|
"""Get or set color in HSV. (Bulb only)"""
|
||||||
if h is None or s is None or v is None:
|
if h is None or s is None or v is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user