mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 11:13:34 +00:00
add lb120 sysinfo to test suite, thanks to githubbuh (#85)
This commit is contained in:
parent
8f83ca8784
commit
3a14484d47
@ -342,6 +342,61 @@ sysinfo_lb110 = {'system': {
|
||||
}
|
||||
}}
|
||||
|
||||
sysinfo_lb120 = {'system':
|
||||
{'sys_info':
|
||||
{'system':
|
||||
{'get_sysinfo':
|
||||
{'active_mode': 'none',
|
||||
'alias': 'LB1202',
|
||||
'ctrl_protocols': {'name': 'Linkie', 'version': '1.0'},
|
||||
'description': 'Smart Wi-Fi LED Bulb with Tunable White Light',
|
||||
'dev_state': 'normal',
|
||||
'deviceId': 'foo',
|
||||
'disco_ver': '1.0',
|
||||
'heapsize': 329032,
|
||||
'hwId': 'foo',
|
||||
'hw_ver': '1.0',
|
||||
'is_color': 0,
|
||||
'is_dimmable': 1,
|
||||
'is_factory': False,
|
||||
'is_variable_color_temp': 1,
|
||||
'light_state': {'dft_on_state': {'brightness': 31,
|
||||
'color_temp': 4100,
|
||||
'hue': 0,
|
||||
'mode': 'normal',
|
||||
'saturation': 0},
|
||||
'on_off': 0},
|
||||
'mic_mac': '50C7BF33937C',
|
||||
'mic_type': 'IOT.SMARTBULB',
|
||||
'model': 'LB120(US)',
|
||||
'oemId': 'foo',
|
||||
'preferred_state': [{'brightness': 100,
|
||||
'color_temp': 3500,
|
||||
'hue': 0,
|
||||
'index': 0,
|
||||
'saturation': 0},
|
||||
{'brightness': 50,
|
||||
'color_temp': 6500,
|
||||
'hue': 0,
|
||||
'index': 1,
|
||||
'saturation': 0},
|
||||
{'brightness': 50,
|
||||
'color_temp': 2700,
|
||||
'hue': 0,
|
||||
'index': 2,
|
||||
'saturation': 0},
|
||||
{'brightness': 1,
|
||||
'color_temp': 2700,
|
||||
'hue': 0,
|
||||
'index': 3,
|
||||
'saturation': 0}],
|
||||
'rssi': -47,
|
||||
'sw_ver': '1.4.3 Build 170504 Rel.144921'}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def error(cls, target, cmd="no-command", msg="default msg"):
|
||||
return {target: {cmd: {"err_code": -1323, "msg": msg}}}
|
||||
|
@ -4,7 +4,8 @@ from functools import partial
|
||||
|
||||
from .. import SmartBulb, SmartDeviceException
|
||||
from .fakes import (FakeTransportProtocol,
|
||||
sysinfo_lb100, sysinfo_lb110, sysinfo_lb130)
|
||||
sysinfo_lb100, sysinfo_lb110,
|
||||
sysinfo_lb120, sysinfo_lb130)
|
||||
BULB_IP = '192.168.250.186'
|
||||
SKIP_STATE_TESTS = False
|
||||
|
||||
@ -196,3 +197,7 @@ class TestSmartBulbLB100(TestSmartBulb):
|
||||
|
||||
class TestSmartBulbLB110(TestSmartBulb):
|
||||
SYSINFO = sysinfo_lb110
|
||||
|
||||
|
||||
class TestSmartBulbLB120(TestSmartBulb):
|
||||
SYSINFO = sysinfo_lb120
|
||||
|
Loading…
Reference in New Issue
Block a user