mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-13 02:48:07 +00:00
Bulbs: allow specifying transition for state changes (#70)
All state changing functions now allow defining transition time in milliseconds
This commit is contained in:
@@ -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.")
|
||||
|
||||
|
Reference in New Issue
Block a user