Bulbs: allow specifying transition for state changes (#70)

All state changing functions now allow defining transition time in milliseconds
This commit is contained in:
Teemu R
2020-06-14 20:21:55 +02:00
committed by GitHub
parent dd073fa8c8
commit 99e0c4a418
3 changed files with 77 additions and 17 deletions

View File

@@ -493,7 +493,7 @@ class SmartDevice:
"""
await self._query_helper("system", "reboot", {"delay": delay})
async def turn_off(self) -> None:
async def turn_off(self) -> Dict:
"""Turn off the device."""
raise NotImplementedError("Device subclass needs to implement this.")
@@ -503,7 +503,7 @@ class SmartDevice:
"""Return True if device is off."""
return not self.is_on
async def turn_on(self) -> None:
async def turn_on(self) -> Dict:
"""Turn device on."""
raise NotImplementedError("Device subclass needs to implement this.")