mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-12-02 14:18:18 +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:
@@ -51,6 +51,15 @@ def test_dimmer_examples(mocker):
|
||||
assert not res["failed"]
|
||||
|
||||
|
||||
def test_lightstrip_examples(mocker):
|
||||
"""Test lightstrip examples."""
|
||||
p = get_device_for_file("KL430(US)_1.0.json")
|
||||
mocker.patch("kasa.smartlightstrip.SmartLightStrip", return_value=p)
|
||||
mocker.patch("kasa.smartlightstrip.SmartLightStrip.update")
|
||||
res = xdoctest.doctest_module("kasa.smartlightstrip", "all")
|
||||
assert not res["failed"]
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
sys.version_info < (3, 8), reason="3.7 handles asyncio.run differently"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user