mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-13 19:08:02 +00:00
Add --transition to bulb-specific cli commands, fix turn_{on,off} signatures (#81)
This commit is contained in:
@@ -337,14 +337,14 @@ class SmartBulb(SmartDevice):
|
||||
light_state = self.light_state
|
||||
return bool(light_state["on_off"])
|
||||
|
||||
async def turn_off(self, *, transition: int = None) -> Dict:
|
||||
async def turn_off(self, *, transition: int = None, **kwargs) -> Dict:
|
||||
"""Turn the bulb off.
|
||||
|
||||
:param int transition: transition in milliseconds.
|
||||
"""
|
||||
return await self.set_light_state({"on_off": 0}, transition=transition)
|
||||
|
||||
async def turn_on(self, *, transition: int = None) -> Dict:
|
||||
async def turn_on(self, *, transition: int = None, **kwargs) -> Dict:
|
||||
"""Turn the bulb on.
|
||||
|
||||
:param int transition: transition in milliseconds.
|
||||
|
Reference in New Issue
Block a user