mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-12-02 06:08:17 +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:
@@ -17,6 +17,7 @@ TPLINK_KELVIN = {
|
||||
"KL130": (2500, 9000),
|
||||
r"KL120\(EU\)": (2700, 6500),
|
||||
r"KL120\(US\)": (2700, 5000),
|
||||
r"KL430\(US\)": (2500, 9000),
|
||||
}
|
||||
|
||||
|
||||
@@ -89,6 +90,7 @@ class SmartBulb(SmartDevice):
|
||||
"""
|
||||
|
||||
LIGHT_SERVICE = "smartlife.iot.smartbulb.lightingservice"
|
||||
SET_LIGHT_METHOD = "transition_light_state"
|
||||
|
||||
def __init__(self, host: str) -> None:
|
||||
super().__init__(host=host)
|
||||
@@ -190,7 +192,7 @@ class SmartBulb(SmartDevice):
|
||||
state["ignore_default"] = 1
|
||||
|
||||
light_state = await self._query_helper(
|
||||
self.LIGHT_SERVICE, "transition_light_state", state
|
||||
self.LIGHT_SERVICE, self.SET_LIGHT_METHOD, state
|
||||
)
|
||||
return light_state
|
||||
|
||||
|
||||
Reference in New Issue
Block a user