mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-06 10:44:04 +00:00
cli: Fix incorrect use of asyncio.run for temperature command (#85)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
"""python-kasa cli tool."""
|
||||
import asyncio
|
||||
import json
|
||||
import logging
|
||||
import re
|
||||
@@ -373,7 +372,7 @@ async def temperature(dev: SmartBulb, temperature: int, transition: int):
|
||||
)
|
||||
else:
|
||||
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()
|
||||
|
Reference in New Issue
Block a user