mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-04-26 16:46:23 +00:00
Add in some new device types (#39)
* Add in some new device types HS103 hardware 1.0 and 2.1 KP400 * Update conftest
This commit is contained in:
parent
18d58388c1
commit
5ff299664e
@ -16,8 +16,8 @@ SUPPORTED_DEVICES = glob.glob(
|
|||||||
|
|
||||||
BULBS = {"LB100", "LB120", "LB130", "KL120", "KL130"}
|
BULBS = {"LB100", "LB120", "LB130", "KL120", "KL130"}
|
||||||
VARIABLE_TEMP = {"LB120", "LB130", "KL120", "KL130"}
|
VARIABLE_TEMP = {"LB120", "LB130", "KL120", "KL130"}
|
||||||
PLUGS = {"HS100", "HS105", "HS110", "HS200", "HS210", "HS220", "HS300"}
|
PLUGS = {"HS100", "HS103", "HS105", "HS110", "HS200", "HS210", "HS220", "HS300"}
|
||||||
STRIPS = {"HS107", "HS300", "KP303"}
|
STRIPS = {"HS107", "HS300", "KP303", "KP400"}
|
||||||
COLOR_BULBS = {"LB130", "KL130"}
|
COLOR_BULBS = {"LB130", "KL130"}
|
||||||
DIMMABLE = {*BULBS, "HS220"}
|
DIMMABLE = {*BULBS, "HS220"}
|
||||||
EMETER = {"HS110", "HS300", *BULBS}
|
EMETER = {"HS110", "HS300", *BULBS}
|
||||||
|
52
kasa/tests/fixtures/HS103(US)_1.0.json
vendored
Normal file
52
kasa/tests/fixtures/HS103(US)_1.0.json
vendored
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"emeter": {
|
||||||
|
"get_realtime": {
|
||||||
|
"err_code": -1,
|
||||||
|
"err_msg": "module not support"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"smartlife.iot.common.emeter": {
|
||||||
|
"err_code": -1,
|
||||||
|
"err_msg": "module not support"
|
||||||
|
},
|
||||||
|
"smartlife.iot.dimmer": {
|
||||||
|
"err_code": -1,
|
||||||
|
"err_msg": "module not support"
|
||||||
|
},
|
||||||
|
"smartlife.iot.smartbulb.lightingservice": {
|
||||||
|
"err_code": -1,
|
||||||
|
"err_msg": "module not support"
|
||||||
|
},
|
||||||
|
"system": {
|
||||||
|
"get_sysinfo": {
|
||||||
|
"active_mode": "schedule",
|
||||||
|
"alias": "Night lite",
|
||||||
|
"dev_name": "Smart Wi-Fi Plug Lite",
|
||||||
|
"deviceId": "0000000000000000000000000000000000000000",
|
||||||
|
"err_code": 0,
|
||||||
|
"feature": "TIM",
|
||||||
|
"fwId": "00000000000000000000000000000000",
|
||||||
|
"hwId": "00000000000000000000000000000000",
|
||||||
|
"hw_ver": "1.0",
|
||||||
|
"icon_hash": "",
|
||||||
|
"latitude_i": 0,
|
||||||
|
"led_off": 0,
|
||||||
|
"longitude_i": 0,
|
||||||
|
"mac": "00:00:00:00:00:00",
|
||||||
|
"model": "HS103(US)",
|
||||||
|
"next_action": {
|
||||||
|
"action": 1,
|
||||||
|
"id": "F98589DFF09AEA1D5AC2BDB4A8867305",
|
||||||
|
"schd_sec": 75600,
|
||||||
|
"type": 1
|
||||||
|
},
|
||||||
|
"oemId": "00000000000000000000000000000000",
|
||||||
|
"on_time": 0,
|
||||||
|
"relay_state": 0,
|
||||||
|
"rssi": -43,
|
||||||
|
"sw_ver": "1.5.7 Build 191114 Rel.105922",
|
||||||
|
"type": "IOT.SMARTPLUGSWITCH",
|
||||||
|
"updating": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
47
kasa/tests/fixtures/HS103(US)_2.1.json
vendored
Normal file
47
kasa/tests/fixtures/HS103(US)_2.1.json
vendored
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
"emeter": {
|
||||||
|
"err_code": -1,
|
||||||
|
"err_msg": "module not support"
|
||||||
|
},
|
||||||
|
"smartlife.iot.common.emeter": {
|
||||||
|
"err_code": -1,
|
||||||
|
"err_msg": "module not support"
|
||||||
|
},
|
||||||
|
"smartlife.iot.dimmer": {
|
||||||
|
"err_code": -1,
|
||||||
|
"err_msg": "module not support"
|
||||||
|
},
|
||||||
|
"smartlife.iot.smartbulb.lightingservice": {
|
||||||
|
"err_code": -1,
|
||||||
|
"err_msg": "module not support"
|
||||||
|
},
|
||||||
|
"system": {
|
||||||
|
"get_sysinfo": {
|
||||||
|
"active_mode": "none",
|
||||||
|
"alias": "Corner",
|
||||||
|
"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": -58,
|
||||||
|
"status": "new",
|
||||||
|
"sw_ver": "1.1.2 Build 191113 Rel.095623",
|
||||||
|
"updating": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
63
kasa/tests/fixtures/KP400(US)_1.0.json
vendored
Normal file
63
kasa/tests/fixtures/KP400(US)_1.0.json
vendored
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
{
|
||||||
|
"emeter": {
|
||||||
|
"err_code": -1,
|
||||||
|
"err_msg": "module not support"
|
||||||
|
},
|
||||||
|
"smartlife.iot.common.emeter": {
|
||||||
|
"err_code": -1,
|
||||||
|
"err_msg": "module not support"
|
||||||
|
},
|
||||||
|
"smartlife.iot.dimmer": {
|
||||||
|
"err_code": -1,
|
||||||
|
"err_msg": "module not support"
|
||||||
|
},
|
||||||
|
"smartlife.iot.smartbulb.lightingservice": {
|
||||||
|
"err_code": -1,
|
||||||
|
"err_msg": "module not support"
|
||||||
|
},
|
||||||
|
"system": {
|
||||||
|
"get_sysinfo": {
|
||||||
|
"alias": "TP-LINK_Smart Plug_2ECE",
|
||||||
|
"child_num": 2,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"alias": "Rope",
|
||||||
|
"id": "00",
|
||||||
|
"next_action": {
|
||||||
|
"action": 1,
|
||||||
|
"schd_sec": 69240,
|
||||||
|
"type": 1
|
||||||
|
},
|
||||||
|
"on_time": 0,
|
||||||
|
"state": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": "Plug 2",
|
||||||
|
"id": "01",
|
||||||
|
"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": "KP400(US)",
|
||||||
|
"ntc_state": 0,
|
||||||
|
"oemId": "00000000000000000000000000000000",
|
||||||
|
"rssi": -78,
|
||||||
|
"status": "new",
|
||||||
|
"sw_ver": "1.0.10 Build 190716 Rel.095026",
|
||||||
|
"updating": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user