mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 19:23:34 +00:00
Add fixtures for LB110, KL110, EP40, KL430, KP115 (#224)
* Add fixtures for LB110, KL110, EP40 * update schema * kl430 fixture * Add KP115 US fixture
This commit is contained in:
parent
7b99f7e9a4
commit
0bcab39e60
@ -28,11 +28,11 @@ SUPPORTED_DEVICES = glob.glob(
|
||||
LIGHT_STRIPS = {"KL430"}
|
||||
VARIABLE_TEMP = {"LB120", "LB130", "KL120", "KL125", "KL130", "KL430", *LIGHT_STRIPS}
|
||||
COLOR_BULBS = {"LB130", "KL125", "KL130", *LIGHT_STRIPS}
|
||||
BULBS = {"KL60", "LB100", *VARIABLE_TEMP, *COLOR_BULBS, *LIGHT_STRIPS}
|
||||
BULBS = {"KL60", "LB100", "LB110", "KL110", *VARIABLE_TEMP, *COLOR_BULBS, *LIGHT_STRIPS}
|
||||
|
||||
|
||||
PLUGS = {"HS100", "HS103", "HS105", "HS110", "HS200", "HS210", "EP10", "KP115"}
|
||||
STRIPS = {"HS107", "HS300", "KP303", "KP400"}
|
||||
STRIPS = {"HS107", "HS300", "KP303", "KP400", "EP40"}
|
||||
DIMMERS = {"HS220"}
|
||||
|
||||
DIMMABLE = {*BULBS, *DIMMERS}
|
||||
|
45
kasa/tests/fixtures/EP40(US)_1.0_1.0.2.json
vendored
Normal file
45
kasa/tests/fixtures/EP40(US)_1.0_1.0.2.json
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"alias": "TP-LINK_Smart Plug_004F",
|
||||
"child_num": 2,
|
||||
"children": [
|
||||
{
|
||||
"alias": "Zombie",
|
||||
"id": "8006231E1499BAC4D4BC7EFCD4B075181E6393F200",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Magic",
|
||||
"id": "8006231E1499BAC4D4BC7EFCD4B075181E6393F201",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
}
|
||||
],
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "EP40(US)",
|
||||
"ntc_state": 0,
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"rssi": -47,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.2 Build 210105 Rel.165938",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
31
kasa/tests/fixtures/HS103(US)_2.1_1.1.4.json
vendored
Normal file
31
kasa/tests/fixtures/HS103(US)_2.1_1.1.4.json
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Plug",
|
||||
"dev_name": "Smart Wi-Fi Plug Lite",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.1",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "HS103(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -48,
|
||||
"status": "new",
|
||||
"sw_ver": "1.1.4 Build 210409 Rel.113427",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
90
kasa/tests/fixtures/HS300(US)_2.0_1.0.3.json
vendored
Normal file
90
kasa/tests/fixtures/HS300(US)_2.0_1.0.3.json
vendored
Normal file
@ -0,0 +1,90 @@
|
||||
{
|
||||
"emeter": {
|
||||
"get_realtime": {
|
||||
"current_ma": 0,
|
||||
"err_code": 0,
|
||||
"power_mw": 0,
|
||||
"slot_id": 0,
|
||||
"total_wh": 0,
|
||||
"voltage_mv": 121302
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"alias": "TP-LINK_Power Strip_5C33",
|
||||
"child_num": 6,
|
||||
"children": [
|
||||
{
|
||||
"alias": "Plug 1",
|
||||
"id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031900",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Plug 2",
|
||||
"id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031901",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Plug 3",
|
||||
"id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031902",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Plug 4",
|
||||
"id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031903",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Plug 5",
|
||||
"id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031904",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Plug 6",
|
||||
"id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031905",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
}
|
||||
],
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM:ENE",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.0",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "HS300(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"rssi": -55,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.3 Build 201203 Rel.165457",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
89
kasa/tests/fixtures/KL110(US)_1.0_1.8.11.json
vendored
Normal file
89
kasa/tests/fixtures/KL110(US)_1.0_1.8.11.json
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 0
|
||||
}
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 95,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"saturation": 0
|
||||
},
|
||||
"err_code": 0,
|
||||
"on_off": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Bulb3",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Smart Wi-Fi LED Bulb with Dimmable Light",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"heapsize": 291620,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 0,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 0,
|
||||
"light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 95,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"saturation": 0
|
||||
},
|
||||
"on_off": 0
|
||||
},
|
||||
"mic_mac": "000000000000",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL110(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 75,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 25,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 2,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 1,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 3,
|
||||
"saturation": 0
|
||||
}
|
||||
],
|
||||
"rssi": -64,
|
||||
"sw_ver": "1.8.11 Build 191113 Rel.105336"
|
||||
}
|
||||
}
|
||||
}
|
92
kasa/tests/fixtures/KL125(US)_2.0_1.0.7.json
vendored
Normal file
92
kasa/tests/fixtures/KL125(US)_2.0_1.0.7.json
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 0,
|
||||
"total_wh": 238
|
||||
}
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 100,
|
||||
"color_temp": 2500,
|
||||
"hue": 255,
|
||||
"mode": "normal",
|
||||
"saturation": 100
|
||||
},
|
||||
"err_code": 0,
|
||||
"on_off": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Test bulb 6",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Smart Wi-Fi LED Bulb with Color Changing",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.0",
|
||||
"is_color": 1,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 1,
|
||||
"latitude_i": 0,
|
||||
"light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 100,
|
||||
"color_temp": 2500,
|
||||
"hue": 255,
|
||||
"mode": "normal",
|
||||
"saturation": 100
|
||||
},
|
||||
"on_off": 0
|
||||
},
|
||||
"longitude_i": 0,
|
||||
"mic_mac": "000000000000",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL125(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 50,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 0,
|
||||
"index": 1,
|
||||
"saturation": 100
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 120,
|
||||
"index": 2,
|
||||
"saturation": 100
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 240,
|
||||
"index": 3,
|
||||
"saturation": 100
|
||||
}
|
||||
],
|
||||
"rssi": -63,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.7 Build 210811 Rel.171439"
|
||||
}
|
||||
}
|
||||
}
|
89
kasa/tests/fixtures/KL130(US)_1.0_1.8.11.json
vendored
Normal file
89
kasa/tests/fixtures/KL130(US)_1.0_1.8.11.json
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 0
|
||||
}
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 30,
|
||||
"color_temp": 0,
|
||||
"hue": 240,
|
||||
"mode": "normal",
|
||||
"saturation": 100
|
||||
},
|
||||
"err_code": 0,
|
||||
"on_off": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Bulb2",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Smart Wi-Fi LED Bulb with Color Changing",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"heapsize": 305252,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 1,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 1,
|
||||
"light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 30,
|
||||
"color_temp": 0,
|
||||
"hue": 240,
|
||||
"mode": "normal",
|
||||
"saturation": 100
|
||||
},
|
||||
"on_off": 0
|
||||
},
|
||||
"mic_mac": "000000000000",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL130(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 50,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 0,
|
||||
"index": 1,
|
||||
"saturation": 75
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 120,
|
||||
"index": 2,
|
||||
"saturation": 75
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 240,
|
||||
"index": 3,
|
||||
"saturation": 75
|
||||
}
|
||||
],
|
||||
"rssi": -52,
|
||||
"sw_ver": "1.8.11 Build 191113 Rel.105336"
|
||||
}
|
||||
}
|
||||
}
|
59
kasa/tests/fixtures/KL430(US)_2.0_1.0.8.json
vendored
Normal file
59
kasa/tests/fixtures/KL430(US)_2.0_1.0.8.json
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 600,
|
||||
"total_wh": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"LEF": 1,
|
||||
"active_mode": "none",
|
||||
"alias": "89 strip",
|
||||
"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": "2.0",
|
||||
"is_color": 1,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 1,
|
||||
"latitude_i": 0,
|
||||
"length": 16,
|
||||
"light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 50,
|
||||
"color_temp": 0,
|
||||
"hue": 30,
|
||||
"mode": "normal",
|
||||
"saturation": 100
|
||||
},
|
||||
"on_off": 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": "KL430(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [],
|
||||
"rssi": -61,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.8 Build 210121 Rel.084339"
|
||||
}
|
||||
}
|
||||
}
|
94
kasa/tests/fixtures/KL60(US)_1.0_1.1.13.json
vendored
Normal file
94
kasa/tests/fixtures/KL60(US)_1.0_1.1.13.json
vendored
Normal file
@ -0,0 +1,94 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"current_ma": 0,
|
||||
"err_code": 0,
|
||||
"power_mw": 0,
|
||||
"total_wh": 0,
|
||||
"voltage_mv": 0
|
||||
}
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 69,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"saturation": 0
|
||||
},
|
||||
"err_code": 0,
|
||||
"on_off": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Fil",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Kasa Smart Edison Bulb, Dimmable",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 0,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 0,
|
||||
"latitude_i": 0,
|
||||
"light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 69,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"saturation": 0
|
||||
},
|
||||
"on_off": 0
|
||||
},
|
||||
"longitude_i": 0,
|
||||
"mic_mac": "000000000000",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL60(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 75,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"index": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 25,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"index": 2,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 1,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"index": 3,
|
||||
"saturation": 0
|
||||
}
|
||||
],
|
||||
"rssi": -55,
|
||||
"status": "new",
|
||||
"sw_ver": "1.1.13 Build 210524 Rel.082619"
|
||||
}
|
||||
}
|
||||
}
|
42
kasa/tests/fixtures/KP115(US)_1.0_1.0.17.json
vendored
Normal file
42
kasa/tests/fixtures/KP115(US)_1.0_1.0.17.json
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"emeter": {
|
||||
"get_realtime": {
|
||||
"current_ma": 0,
|
||||
"err_code": 0,
|
||||
"power_mw": 0,
|
||||
"total_wh": 0,
|
||||
"voltage_mv": 121148
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Test plug",
|
||||
"dev_name": "Smart Wi-Fi Plug Mini",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM:ENE",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KP115(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"ntc_state": 0,
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 301,
|
||||
"relay_state": 1,
|
||||
"rssi": -59,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.17 Build 210506 Rel.075231",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
54
kasa/tests/fixtures/KP303(US)_2.0_1.0.3.json
vendored
Normal file
54
kasa/tests/fixtures/KP303(US)_2.0_1.0.3.json
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"alias": "TP-LINK_Power Strip_BDF6",
|
||||
"child_num": 3,
|
||||
"children": [
|
||||
{
|
||||
"alias": "Plug 1",
|
||||
"id": "800681855E0E9AEF096F4891B3DC88C71E59F42E00",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Plug 2",
|
||||
"id": "800681855E0E9AEF096F4891B3DC88C71E59F42E01",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Plug 3",
|
||||
"id": "800681855E0E9AEF096F4891B3DC88C71E59F42E02",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
}
|
||||
],
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.0",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KP303(US)",
|
||||
"ntc_state": 0,
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"rssi": -56,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.3 Build 201015 Rel.173920",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
89
kasa/tests/fixtures/LB110(US)_1.0_1.8.11.json
vendored
Normal file
89
kasa/tests/fixtures/LB110(US)_1.0_1.8.11.json
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 0
|
||||
}
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 100,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"saturation": 0
|
||||
},
|
||||
"err_code": 0,
|
||||
"on_off": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "TP-LINK_Smart Bulb_43EC",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Smart Wi-Fi LED Bulb with Dimmable Light",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"heapsize": 290048,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 0,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 0,
|
||||
"light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 100,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"saturation": 0
|
||||
},
|
||||
"on_off": 0
|
||||
},
|
||||
"mic_mac": "000000000000",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "LB110(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 75,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 25,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 2,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 1,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 3,
|
||||
"saturation": 0
|
||||
}
|
||||
],
|
||||
"rssi": -59,
|
||||
"sw_ver": "1.8.11 Build 191113 Rel.105336"
|
||||
}
|
||||
}
|
||||
}
|
@ -62,6 +62,7 @@ CURRENT_CONSUMPTION_SCHEMA = Schema(
|
||||
"current_ma": Any(
|
||||
All(float, Range(min=0)), int, None
|
||||
), # TODO can this be int?
|
||||
"slot_id": Any(Coerce(int, Range(min=0)), None),
|
||||
},
|
||||
None,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user