Add --transition to bulb-specific cli commands, fix turn_{on,off} signatures (#81)

This commit is contained in:
Teemu R
2020-07-06 16:10:28 +02:00
committed by GitHub
parent 44e2998705
commit 4d722e25c1
6 changed files with 25 additions and 20 deletions

View File

@@ -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.