mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-03-13 20:11:32 +00:00
Add fixture for KL60 (#52)
This commit is contained in:
parent
51af7809ec
commit
c6d76836d7
@ -27,6 +27,7 @@ Python Library to control TPLink smart plugs/switches and smart bulbs.
|
||||
* LB120
|
||||
* LB130
|
||||
* LB230
|
||||
* KL60
|
||||
* KL110
|
||||
* KL120
|
||||
* KL130
|
||||
|
@ -15,7 +15,7 @@ SUPPORTED_DEVICES = glob.glob(
|
||||
)
|
||||
|
||||
|
||||
BULBS = {"LB100", "LB120", "LB130", "KL120", "KL130"}
|
||||
BULBS = {"KL60", "LB100", "LB120", "LB130", "KL120", "KL130"}
|
||||
VARIABLE_TEMP = {"LB120", "LB130", "KL120", "KL130"}
|
||||
PLUGS = {"HS100", "HS103", "HS105", "HS110", "HS200", "HS210", "HS300"}
|
||||
STRIPS = {"HS107", "HS300", "KP303", "KP400"}
|
||||
|
102
kasa/tests/fixtures/KL60(UN)_1.0.json
vendored
Normal file
102
kasa/tests/fixtures/KL60(UN)_1.0.json
vendored
Normal file
@ -0,0 +1,102 @@
|
||||
{
|
||||
"emeter": {
|
||||
"err_code": -2001,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"current_ma": 0,
|
||||
"err_code": 0,
|
||||
"power_mw": 0,
|
||||
"total_wh": 0,
|
||||
"voltage_mv": 0
|
||||
}
|
||||
},
|
||||
"smartlife.iot.dimmer": {
|
||||
"err_code": -2001,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 95,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"saturation": 0
|
||||
},
|
||||
"err_code": 0,
|
||||
"on_off": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "TP-LINK_Smart Bulb_9179",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Kasa Smart Edison Bulb, Dimmable",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 0,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 0,
|
||||
"latitude_i": 0,
|
||||
"light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 95,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"saturation": 0
|
||||
},
|
||||
"on_off": 0
|
||||
},
|
||||
"longitude_i": 0,
|
||||
"mic_mac": "74DA88C89179",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL60(UN)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 75,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"index": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 25,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"index": 2,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 1,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"index": 3,
|
||||
"saturation": 0
|
||||
}
|
||||
],
|
||||
"rssi": -60,
|
||||
"status": "new",
|
||||
"sw_ver": "1.1.4 Build 190618 Rel.085624"
|
||||
}
|
||||
}
|
||||
}
|
@ -125,7 +125,7 @@ BULB_SCHEMA = PLUG_SCHEMA.extend(
|
||||
"dft_on_state": Optional(
|
||||
{
|
||||
"brightness": All(int, Range(min=0, max=100)),
|
||||
"color_temp": All(int, Range(min=2700, max=9000)),
|
||||
"color_temp": All(int, Range(min=2000, max=9000)),
|
||||
"hue": All(int, Range(min=0, max=255)),
|
||||
"mode": str,
|
||||
"saturation": All(int, Range(min=0, max=255)),
|
||||
|
Loading…
x
Reference in New Issue
Block a user