fix hs105 mac to pass the test, wrap sysinfo_lb110 properly inside 'system'

This commit is contained in:
Teemu Rytilahti 2017-08-05 17:21:23 +02:00
parent 92c9cddfd4
commit 5839c2d1de

View File

@ -71,7 +71,7 @@ sysinfo_hs105 = {'system': {'get_sysinfo':
{'sw_ver': '1.0.6 Build 160722 Rel.081616', {'sw_ver': '1.0.6 Build 160722 Rel.081616',
'hw_ver': '1.0', 'type': 'IOT.SMARTPLUGSWITCH', 'hw_ver': '1.0', 'type': 'IOT.SMARTPLUGSWITCH',
'model': 'HS105(US)', 'model': 'HS105(US)',
'mac': '50:C7:BF:xx:xx:xx', 'mac': '50:C7:BF:11:22:33',
'dev_name': 'Smart Wi-Fi Plug Mini', 'dev_name': 'Smart Wi-Fi Plug Mini',
'alias': 'TP-LINK_Smart Plug_CF0B', 'alias': 'TP-LINK_Smart Plug_CF0B',
'relay_state': 0, 'relay_state': 0,
@ -198,7 +198,9 @@ sysinfo_lb130 = {'system': {'get_sysinfo':
'smartlife.iot.common.emeter': emeter_units_support, 'smartlife.iot.common.emeter': emeter_units_support,
} }
sysinfo_lb110 = {'sys_info': {'emeter': sysinfo_lb110 = {'system': {
'sys_info':
{'emeter':
{'err_code': -2001, {'err_code': -2001,
'err_msg': 'Module not support'}, 'err_msg': 'Module not support'},
'system': 'system':
@ -261,7 +263,7 @@ sysinfo_lb110 = {'sys_info': {'emeter':
} }
} }
} }
} }}
def error(cls, target, cmd="no-command", msg="default msg"): def error(cls, target, cmd="no-command", msg="default msg"):
return {target: {cmd: {"err_code": -1323, "msg": msg}}} return {target: {cmd: {"err_code": -1323, "msg": msg}}}