From f22efd041cc0b49d049b41933b07f95dfcf33c21 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 13 Apr 2022 12:48:13 -1000 Subject: [PATCH 1/2] Add fixtures for kl420 --- kasa/tests/conftest.py | 2 +- .../tests/fixtures/KL420L5(US)_1.0_1.0.2.json | 57 +++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 kasa/tests/fixtures/KL420L5(US)_1.0_1.0.2.json diff --git a/kasa/tests/conftest.py b/kasa/tests/conftest.py index f9fc917f6..93d374734 100644 --- a/kasa/tests/conftest.py +++ b/kasa/tests/conftest.py @@ -25,7 +25,7 @@ ) -LIGHT_STRIPS = {"KL400", "KL430"} +LIGHT_STRIPS = {"KL400", "KL430", "KL420"} VARIABLE_TEMP = {"LB120", "LB130", "KL120", "KL125", "KL130", "KL135", "KL430"} COLOR_BULBS = {"LB130", "KL125", "KL130", "KL135", *LIGHT_STRIPS} BULBS = { diff --git a/kasa/tests/fixtures/KL420L5(US)_1.0_1.0.2.json b/kasa/tests/fixtures/KL420L5(US)_1.0_1.0.2.json new file mode 100644 index 000000000..0d19e7949 --- /dev/null +++ b/kasa/tests/fixtures/KL420L5(US)_1.0_1.0.2.json @@ -0,0 +1,57 @@ +{ + "smartlife.iot.common.emeter": { + "get_realtime": { + "err_code": 0, + "power_mw": 1503, + "total_wh": 0 + } + }, + "system": { + "get_sysinfo": { + "LEF": 1, + "active_mode": "none", + "alias": "Kl420 test", + "ctrl_protocols": { + "name": "Linkie", + "version": "1.0" + }, + "description": "Kasa Smart Light Strip, Multicolor", + "dev_state": "normal", + "deviceId": "0000000000000000000000000000000000000000", + "disco_ver": "1.0", + "err_code": 0, + "hwId": "00000000000000000000000000000000", + "hw_ver": "1.0", + "is_color": 1, + "is_dimmable": 1, + "is_factory": false, + "is_variable_color_temp": 0, + "latitude_i": 0, + "length": 50, + "light_state": { + "brightness": 100, + "color_temp": 6500, + "hue": 0, + "mode": "normal", + "on_off": 1, + "saturation": 0 + }, + "lighting_effect_state": { + "brightness": 50, + "custom": 0, + "enable": 0, + "id": "", + "name": "station" + }, + "longitude_i": 0, + "mic_mac": "00:00:00:00:00:00", + "mic_type": "IOT.SMARTBULB", + "model": "KL420L5(US)", + "oemId": "00000000000000000000000000000000", + "preferred_state": [], + "rssi": -44, + "status": "new", + "sw_ver": "1.0.2 Build 211009 Rel.164949" + } + } +} From 3fe657c05cab0f696efffa25fbab1bf316d7369a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 13 Apr 2022 14:16:30 -1000 Subject: [PATCH 2/2] readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 126b4afcc..9d62cb818 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,7 @@ or the `parse_pcap.py` script contained inside the `devtools` directory. ### Light strips * KL400 +* KL420 * KL430 **Contributions (be it adding missing features, fixing bugs or improving documentation) are more than welcome, feel free to submit pull requests!**