8000 Add fixtures for LB110, KL110, EP40, KL430, KP115 (#224) · akshat-ja/python-kasa@0bcab39 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0bcab39

Browse files
authored
Add fixtures for LB110, KL110, EP40, KL430, KP115 (python-kasa#224)
* Add fixtures for LB110, KL110, EP40 * update schema * kl430 fixture * Add KP115 US fixture
1 parent 7b99f7e commit 0bcab39

13 files changed

+777
-2
lines changed

kasa/tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
LIGHT_STRIPS = {"KL430"}
2929
VARIABLE_TEMP = {"LB120", "LB130", "KL120", "KL125", "KL130", "KL430", *LIGHT_STRIPS}
3030
COLOR_BULBS = {"LB130", "KL125", "KL130", *LIGHT_STRIPS}
31-
BULBS = {"KL60", "LB100", *VARIABLE_TEMP, *COLOR_BULBS, *LIGHT_STRIPS}
31+
BULBS = {"KL60", "LB100", "LB110", "KL110", *VARIABLE_TEMP, *COLOR_BULBS, *LIGHT_STRIPS}
3232

3333

3434
PLUGS = {"HS100", "HS103", "HS105", "HS110", "HS200", "HS210", "EP10", "KP115"}
35-
STRIPS = {"HS107", "HS300", "KP303", "KP400"}
35+
STRIPS = {"HS107", "HS300", "KP303", "KP400", "EP40"}
3636
DIMMERS = {"HS220"}
3737

3838
DIMMABLE = {*BULBS, *DIMMERS}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"system": {
3+
"get_sysinfo": {
4+
"alias": "TP-LINK_Smart Plug_004F",
5+
"child_num": 2,
6+
"children": [
7+
{
8+
"alias": "Zombie",
9+
"id": "8006231E1499BAC4D4BC7EFCD4B075181E6393F200",
10+
"next_action": {
11+
"type": -1
12+
},
13+
"on_time": 0,
14+
"state": 0
15+
},
16+
{
17+
"alias": "Magic",
18+
"id": "8006231E1499BAC4D4BC7EFCD4B075181E6393F201",
19+
"next_action": {
20+
"type": -1
21+
},
22+
"on_time": 0,
23+
"state": 0
24+
}
25+
],
26+
"deviceId": "0000000000000000000000000000000000000000",
27+
"err_code": 0,
28+
"feature": "TIM",
29+
"hwId": "00000000000000000000000000000000",
30+
"hw_ver": "1.0",
31+
"latitude_i": 0,
32+
"led_off": 0,
33+
"longitude_i": 0,
34+
"mac": "00:00:00:00:00:00",
35+
"mic_type": "IOT.SMARTPLUGSWITCH",
36+
"model": "EP40(US)",
37+
"ntc_state": 0,
38+
"oemId": "00000000000000000000000000000000",
39+
"rssi": -47,
40+
"status": "new",
41+
"sw_ver": "1.0.2 Build 210105 Rel.165938",
42+
"updating": 0
43+
}
44+
}
45+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"system": {
3+
"get_sysinfo": {
4+
"active_mode": "none",
5+
"alias": "Plug",
6+
"dev_name": "Smart Wi-Fi Plug Lite",
7+
"deviceId": "0000000000000000000000000000000000000000",
8+
"err_code": 0,
9+
"feature": "TIM",
10+
"hwId": "00000000000000000000000000000000",
11+
"hw_ver": "2.1",
12+
"icon_hash": "",
13+
"latitude_i": 0,
14+
"led_off": 0,
15+
"longitude_i": 0,
16+
"mac": "00:00:00:00:00:00",
17+
"mic_type": "IOT.SMARTPLUGSWITCH",
18+
"model": "HS103(US)",
19+
"next_action": {
20+
"type": -1
21+
},
22+
"oemId": "00000000000000000000000000000000",
23+
"on_time": 0,
24+
"relay_state": 0,
25+
"rssi": -48,
26+
"status": "new",
27+
"sw_ver": "1.1.4 Build 210409 Rel.113427",
28+
"updating": 0
29+
}
30+
}
31+
}
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"emeter": {
3+
"get_realtime": {
4+
"current_ma": 0,
5+
"err_code": 0,
6+
"power_mw": 0,
7+
"slot_id": 0,
8+
"total_wh": 0,
9+
"voltage_mv": 121302
10+
}
11+
},
12+
"system": {
13+
"get_sysinfo": {
14+
"alias": "TP-LINK_Power Strip_5C33",
15+
"child_num": 6,
16+
"children": [
17+
{
18+
"alias": "Plug 1",
19+
"id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031900",
20+
"next_action": {
21+
"type": -1
22+
},
23+
"on_time": 0,
24+
"state": 0
25+
},
26+
{
27+
"alias": "Plug 2",
28+
"id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031901",
29+
"next_action": {
30+
"type": -1
31+
},
32+
"on_time": 0,
33+
"state": 0
34+
},
35+
{
36+
"alias": "Plug 3",
37+
"id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031902",
38+
"next_action": {
39+
"type": -1
40+
},
41+
"on_time": 0,
42+
"state": 0
43+
},
44+
{
45+
"alias": "Plug 4",
46+
"id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031903",
47+
"next_action": {
48+
"type": -1
49+
},
50+
"on_time": 0,
51+
"state": 0
52+
},
53+
{
54+
"alias": "Plug 5",
55+
"id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031904",
56+
"next_action": {
57+
"type": -1
58+
},
59+
"on_time": 0,
60+
"state": 0
61+
},
62+
{
63+
"alias": "Plug 6",
64+
"id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031905",
65+
"next_action": {
66+
"type": -1
67+
},
68+
"on_time": 0,
69+
"state": 0
70+
}
71+
],
72+
"deviceId": "0000000000000000000000000000000000000000",
73+
"err_code": 0,
74+
"feature": "TIM:ENE",
75+
"hwId": "00000000000000000000000000000000",
76+
"hw_ver": "2.0",
77+
"latitude_i": 0,
78+
"led_off": 0,
79+
"longitude_i": 0,
80+
"mac": "00:00:00:00:00:00",
81+
"mic_type": "IOT.SMARTPLUGSWITCH",
82+
"model": "HS300(US)",
83+
"oemId": "00000000000000000000000000000000",
84+
"rssi": -55,
85+
"status": "new",
86+
"sw_ver": "1.0.3 Build 201203 Rel.165457",
87+
"updating": 0
88+
}
89+
}
90+
}
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
{
2+
"smartlife.iot.common.emeter": {
3+
"get_realtime": {
4+
"err_code": 0,
5+
"power_mw": 0
6+
}
7+
},
8+
"smartlife.iot.smartbulb.lightingservice": {
9+
"get_light_state": {
10+
"dft_on_state": {
11+
"brightness": 95,
12+
"color_temp": 2700,
13+
"hue": 0,
14+
"mode": "normal",
15+
"saturation": 0
16+
},
17+
"err_code": 0,
18+
"on_off": 0
19+
}
20+
},
21+
"system": {
22+
"get_sysinfo": {
23+
"active_mode": "none",
24+
"alias": "Bulb3",
25+
"ctrl_protocols": {
26+
"name": "Linkie",
27+
"version": "1.0"
28+
},
29+
"description": "Smart Wi-Fi LED Bulb with Dimmable Light",
30+
"dev_state": "normal",
31+
"deviceId": "0000000000000000000000000000000000000000",
32+
"disco_ver": "1.0",
33+
"err_code": 0,
34+
"heapsize": 291620,
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+
"light_state": {
42+
"dft_on_state": {
43+
"brightness": 95,
44+
"color_temp": 2700,
45+
"hue": 0,
46+
"mode": "normal",
47+
"saturation": 0
48+
},
49+
"on_off": 0
50+
},
51+
"mic_mac": "000000000000",
52+
"mic_type": "IOT.SMARTBULB",
53+
"model": "KL110(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": -64,
86+
"sw_ver": "1.8.11 Build 191113 Rel.105336"
87+
}
88+
}
89+
}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
{
2+
"smartlife.iot.common.emeter": {
3+
"get_realtime": {
4+
"err_code": 0,
5+
"power_mw": 0,
6+
"total_wh": 238
7+
}
8+
},
9+
"smartlife.iot.smartbulb.lightingservice": {
10+
"get_light_state": {
11+
"dft_on_state": {
12+
"brightness": 100,
13+
"color_temp": 2500,
14+
"hue": 255,
15+
"mode": "normal",
16+
"saturation": 100
17+
},
18+
"err_code": 0,
19+
"on_off": 0
20+
}
21+
},
22+
"system": {
23+
"get_sysinfo": {
24+
"active_mode": "none",
25+
"alias": "Test bulb 6",
26+
"ctrl_protocols": {
27+
"name": "Linkie",
28+
"version": "1.0"
29+
},
30+
"description": "Smart Wi-Fi LED Bulb with Color Changing",
31+
"dev_state": "normal",
32+
"deviceId": "0000000000000000000000000000000000000000",
33+
"disco_ver": "1.0",
34+
"err_code": 0,
35+
"hwId": "00000000000000000000000000000000",
36+
"hw_ver": "2.0",
37+
"is_color": 1,
38+
"is_dimmable": 1,
39+
"is_factory": false,
40+
"is_variable_color_temp": 1,
41+
"latitude_i": 0,
42+
"light_state": {
43+
"dft_on_state": {
44+
"brightness": 100,
45+
"color_temp": 2500,
46+
"hue": 255,
47+
"mode": "normal",
48+
"saturation": 100
49+
},
50+
"on_off": 0
51+
},
52+
"longitude_i": 0,
53+
"mic_mac": "000000000000",
54+
"mic_type": "IOT.SMARTBULB",
55+
"model": "KL125(US)",
56+
"oemId": "00000000000000000000000000000000",
57+
"preferred_state": [
58+
{
59+
"brightness": 50,
60+
"color_temp": 2700,
61+
"hue": 0,
62+
"index": 0,
63+
"saturation": 0
64+
},
65+
{
66+
"brightness": 100,
67+
"color_temp": 0,
68+
"hue": 0,
69+
"index": 1,
70+
"saturation": 100
71+
},
72+
{
73+
"brightness": 100,
74+
"color_temp": 0,
75+
"hue": 120,
76+
"index": 2,
77+
"saturation": 100
78+
},
79+
{
80+
"brightness": 100,
81+
"color_temp": 0,
82+
"hue": 240,
83+
"index": 3,
84+
"saturation": 100
85+
}
86+
],
87+
"rssi": -63,
88+
"status": "new",
89+
"sw_ver": "1.0.7 Build 210811 Rel.171439"
90+
}
91+
}
92+
}

0 commit comments

Comments
 (0)
0