mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-04-26 16:46:23 +00:00
cli: Fix incorrect use of asyncio.run for temperature command (#85)
This commit is contained in:
parent
4d722e25c1
commit
96c15362c3
@ -1,5 +1,4 @@
|
|||||||
"""python-kasa cli tool."""
|
"""python-kasa cli tool."""
|
||||||
import asyncio
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
@ -373,7 +372,7 @@ async def temperature(dev: SmartBulb, temperature: int, transition: int):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
click.echo(f"Setting color temperature to {temperature}")
|
click.echo(f"Setting color temperature to {temperature}")
|
||||||
asyncio.run(dev.set_color_temp(temperature, transition=transition))
|
await dev.set_color_temp(temperature, transition=transition)
|
||||||
|
|
||||||
|
|
||||||
@cli.command()
|
@cli.command()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user