mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-06 18:54:08 +00:00
Update dump_devinfo to include 20002 discovery results (#556)
* Fix dump_devinfo and add discovery_result to json * Update following review. Do not serialize aliases. * Delete kasa/tests/fixtures/HS100(UK)_1.0_1.2.6.json
This commit is contained in:
47
kasa/tests/fixtures/HS100(UK)_4.1_1.1.0.json
vendored
47
kasa/tests/fixtures/HS100(UK)_4.1_1.1.0.json
vendored
@@ -1,43 +1,46 @@
|
||||
{
|
||||
"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"
|
||||
"discovery_result": {
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "HS100(UK)",
|
||||
"device_type": "IOT.SMARTPLUGSWITCH",
|
||||
"factory_default": true,
|
||||
"hw_ver": "4.1",
|
||||
"ip": "127.0.0.123",
|
||||
"mac": "00-00-00-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"encrypt_type": "KLAP",
|
||||
"http_port": 80,
|
||||
"is_support_https": false
|
||||
},
|
||||
"owner": "00000000000000000000000000000000"
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "schedule",
|
||||
"alias": "Unused 3",
|
||||
"active_mode": "none",
|
||||
"alias": "Bedroom Lamp 2",
|
||||
"dev_name": "Smart Wi-Fi Plug",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"fwId": "00000000000000000000000000000000",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "4.1",
|
||||
"icon_hash": "",
|
||||
"latitude": 0,
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "HS100(UK)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"ntc_state": 0,
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -63,
|
||||
"rssi": -66,
|
||||
"status": "new",
|
||||
"sw_ver": "1.1.0 Build 201016 Rel.175121",
|
||||
"type": "IOT.SMARTPLUGSWITCH",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
|
@@ -294,9 +294,10 @@ class FakeTransportProtocol(TPLinkSmartHomeProtocol):
|
||||
|
||||
for target in info:
|
||||
# print("target %s" % target)
|
||||
for cmd in info[target]:
|
||||
# print("initializing tgt %s cmd %s" % (target, cmd))
|
||||
proto[target][cmd] = info[target][cmd]
|
||||
if target != "discovery_result":
|
||||
for cmd in info[target]:
|
||||
# print("initializing tgt %s cmd %s" % (target, cmd))
|
||||
proto[target][cmd] = info[target][cmd]
|
||||
# if we have emeter support, we need to add the missing pieces
|
||||
for module in ["emeter", "smartlife.iot.common.emeter"]:
|
||||
if (
|
||||
|
Reference in New Issue
Block a user