mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 19:23:34 +00:00
Add test fixture for KL130 (#35)
* Add test fixture for KL130 * Update test
This commit is contained in:
parent
f4e5afa20b
commit
18d58388c1
@ -14,11 +14,11 @@ SUPPORTED_DEVICES = glob.glob(
|
||||
os.path.dirname(os.path.abspath(__file__)) + "/fixtures/*.json"
|
||||
)
|
||||
|
||||
BULBS = {"LB100", "LB120", "LB130", "KL120"}
|
||||
VARIABLE_TEMP = {"LB120", "LB130", "KL120"}
|
||||
BULBS = {"LB100", "LB120", "LB130", "KL120", "KL130"}
|
||||
VARIABLE_TEMP = {"LB120", "LB130", "KL120", "KL130"}
|
||||
PLUGS = {"HS100", "HS105", "HS110", "HS200", "HS210", "HS220", "HS300"}
|
||||
STRIPS = {"HS107", "HS300", "KP303"}
|
||||
COLOR_BULBS = {"LB130"}
|
||||
COLOR_BULBS = {"LB130", "KL130"}
|
||||
DIMMABLE = {*BULBS, "HS220"}
|
||||
EMETER = {"HS110", "HS300", *BULBS}
|
||||
|
||||
|
93
kasa/tests/fixtures/KL130(US)_1.0.json
vendored
Normal file
93
kasa/tests/fixtures/KL130(US)_1.0.json
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
{
|
||||
"emeter": {
|
||||
"err_code": -2001,
|
||||
"err_msg": "Module not support"
|
||||
},
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 800
|
||||
}
|
||||
},
|
||||
"smartlife.iot.dimmer": {
|
||||
"err_code": -2001,
|
||||
"err_msg": "Module not support"
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"brightness": 0,
|
||||
"color_temp": 0,
|
||||
"err_code": 0,
|
||||
"hue": 15,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 100
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Nick office tplink",
|
||||
"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": 306332,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 1,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 1,
|
||||
"light_state": {
|
||||
"brightness": 0,
|
||||
"color_temp": 0,
|
||||
"hue": 15,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 100
|
||||
},
|
||||
"mic_mac": "1C3BF373CA4E",
|
||||
"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": -62,
|
||||
"sw_ver": "1.8.11 Build 191113 Rel.105336"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user