8000 Add KL400, KL50 fixtures (#231) · allandaly/python-kasa@c65705b · GitHub
[go: up one dir, main page]

Skip to content

Commit c65705b

Browse files
authored
Add KL400, KL50 fixtures (python-kasa#231)
* Add KL400 fixture * Add KL400 fixture * Add KL50 fixture * tweaks
1 parent 98b4155 commit c65705b

File tree

4 files changed

+160
-3
lines changed

4 files changed

+160
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ or the `parse_pcap.py` script contained inside the `devtools` directory.
148148

149149
### Light strips
150150

151+
* KL400
151152
* KL430
152153

153154
**Contributions (be it adding missing features, fixing bugs or improving documentation) are more than welcome, feel free to submit pull requests!**

kasa/tests/conftest.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,19 @@
2525
)
2626

2727

28-
LIGHT_STRIPS = {"KL430"}
29-
VARIABLE_TEMP = {"LB120", "LB130", "KL120", "KL125", "KL130", "KL430", *LIGHT_STRIPS}
28+
LIGHT_STRIPS = {"KL400", "KL430"}
29+
VARIABLE_TEMP = {"LB120", "LB130", "KL120", "KL125", "KL130", "KL430"}
3030
COLOR_BULBS = {"LB130", "KL125", "KL130", *LIGHT_STRIPS}
31-
BULBS = {"KL60", "LB100", "LB110", "KL110", *VARIABLE_TEMP, *COLOR_BULBS, *LIGHT_STRIPS}
31+
BULBS = {
32+
"KL50",
33+
"KL60",
34+
"LB100",
35+
"LB110",
36+
"KL110",
37+
*VARIABLE_TEMP,
38+
*COLOR_BULBS,
39+
*LIGHT_STRIPS,
40+
}
3241

3342

3443
PLUGS = {"HS100", "HS103", "HS105", "HS110", "HS200", "HS210", "EP10", "KP115"}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"smartlife.iot.common.emeter": {
3+
"get_realtime": {
4+
"err_code": 0,
5+
"power_mw": 10800,
6+
"total_wh": 0
7+
}
8+
},
9+
"system": {
10+
"get_sysinfo": {
11+
"LEF": 0,
12+
"active_mode": "none",
13+
"alias": "Kl400",
14+
"ctrl_protocols": {
15+
"name": "Linkie",
16+
"version": "1.0"
17+
},
18+
"description": "Kasa Smart Light Strip, Multicolor",
19+
"dev_state": "normal",
20+
"deviceId": "0000000000000000000000000000000000000000",
21+
"disco_ver": "1.0",
22+
"err_code": 0,
23+
"hwId": "00000000000000000000000000000000",
24+
"hw_ver": "1.0",
25+
"is_color": 1,
26+
"is_dimmable": 1,
27+
"is_factory": false,
28+
"is_variable_color_temp": 0,
29+
"latitude_i": 0,
30+
"length": 16,
31+
"light_state": {
32+
"brightness": 100,
33+
"color_temp": 6500,
34+
"hue": 0,
35+
"mode": "normal",
36+
"on_off": 1,
37+
"saturation": 0
38+
},
39+
"lighting_effect_state": {
40+
"brightness": 50,
41+
"custom": 0,
42+
"enable": 0,
43+
"id": "",
44+
"name": "station"
45+
},
46+
"longitude_i": 0,
47+
"mic_mac": "00:00:00:00:00:00",
48+
"mic_type": "IOT.SMARTBULB",
49+
"model": "KL400L5(US)",
50+
"oemId": "00000000000000000000000000000000",
51+
"preferred_state": [],
52+
"rssi": -58,
53+
"status": "new",
54+
"sw_ver": "1.0.5 Build 210616 Rel.122727"
55+
}
56+
}
57+
}
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"smartlife.iot.common.emeter": {
3+
"get_realtime": {
4+
"current_ma": 0,
5+
"err_code": 0,
6+
"power_mw": 998,
7+
"total_wh": 1,
8+
"voltage_mv": 0
9+
}
10+
},
11+ "smartlife.iot.smartbulb.lightingservice": {
12+
"get_light_state": {
13+
"brightness": 12,
14+
"color_temp": 2700,
15+
"err_code": 0,
16+
"hue": 0,
17+
"mode": "normal",
18+
"on_off": 1,
19+
"saturation": 0
20+
}
21+
},
22+
"system": {
23+
"get_sysinfo": {
24+
"active_mode": "none",
25+
"alias": "Kl50",
26+
"ctrl_protocols": {
27+
"name": "Linkie",
28+
"version": "1.0"
29+
},
30+
"description": "Kasa Smart Edison Bulb, Dimmable",
31+
"dev_state": "normal",
32+
"deviceId": "0000000000000000000000000000000000000000",
33+
"disco_ver": "1.0",
34+
"err_code": 0,
35+
"hwId": "00000000000000000000000000000000",
36+
"hw_ver": "1.0",
37+
"is_color": 0,
38+
"is_dimmable": 1,
39+
"is_factory": false,
40+
"is_variable_color_temp": 0,
41+
"latitude_i": 0,
42+
"light_state": {
43+
"brightness": 12,
44+
"color_temp": 2700,
45+
"hue": 0,
46+
"mode": "normal",
47+
"on_off": 1,
48+
"saturation": 0
49+
},
50+
"longitude_i": 0,
51+
"mic_mac": "000000000000",
52+
"mic_type": "IOT.SMARTBULB",
53+
"model": "KL50(US)",
54+
"oemId": "00000000000000000000000000000000",
55+
"preferred_state": [
56+
{
57+
"brightness": 100,
58+
"color_temp": 2700,
59+
"hue": 0,
60+
"index": 0,
61+
"saturation": 0
62+
},
63+
{
64+
"brightness": 75,
65+
"color_temp": 2700,
66+
"hue": 0,
67+
"index": 1,
68+
"saturation": 0
69+
},
70+
{
71+
"brightness": 25,
72+
"color_temp": 2700,
73+
"hue": 0,
74+
"index": 2,
75+
"saturation": 0
76+
},
77+
{
78+
"brightness": 1,
79+
"color_temp": 2700,
80+
"hue": 0,
81+
"index": 3,
82+
"saturation": 0
83+
}
84+
],
85+
"rssi": -68,
86+
"status": "new",
87+
"sw_ver": "1.1.13 Build 210524 Rel.082619"
88+
}
89+
}
90+
}

0 commit comments

Comments
 (0)
0