mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-12-16 13:08:28 +00:00
Add support for lightstrips (KL430) (#74)
* Preliminary support for light strips
* Add color temperature range and cleanup, thanks to @darkoppressor
* Use lightstrip instead of {led,light}strip consistently everywhere
* The cli flag is now --lightstrip
* add apidocs
* Add fixture file for KL430
Signed-off-by: Kevin Wells <darkoppressor@gmail.com>
* Add discovery support, expose effect and length of the strip
* use set_light_state instead of transition_light_state
* Add tests for lightstrip
* add doctests
* Add KL430 to supported devices in README
Co-authored-by: Kevin Wells <darkoppressor@gmail.com>
This commit is contained in:
@@ -32,6 +32,7 @@ class DeviceType(Enum):
|
||||
Bulb = 2
|
||||
Strip = 3
|
||||
Dimmer = 4
|
||||
LightStrip = 5
|
||||
Unknown = -1
|
||||
|
||||
|
||||
@@ -702,6 +703,11 @@ class SmartDevice:
|
||||
"""Return True if the device is a bulb."""
|
||||
return self._device_type == DeviceType.Bulb
|
||||
|
||||
@property
|
||||
def is_light_strip(self) -> bool:
|
||||
"""Return True if the device is a led strip."""
|
||||
return self._device_type == DeviceType.LightStrip
|
||||
|
||||
@property
|
||||
def is_plug(self) -> bool:
|
||||
"""Return True if the device is a plug."""
|
||||
|
||||
Reference in New Issue
Block a user