FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add KL420 to TPLINK_KELVIN color temperature ranges by Ikstar · Pull Request #1757 · python-kasa/python-kasa · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .json  (1) .md  (1) .py  (3) All 3 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
1 change: 1 addition & 0 deletions SUPPORTED.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ Some newer Kasa devices require authentication. These are marked with [^1] in th
- Hardware: 1.0 (US) / Firmware: 1.0.8
- **KL420L5**
- Hardware: 1.0 (US) / Firmware: 1.0.2
- Hardware: 1.0 (US) / Firmware: 1.0.7
- **KL430**
- Hardware: 2.0 (UN) / Firmware: 1.0.8
- Hardware: 1.0 (US) / Firmware: 1.0.10
Expand Down
1 change: 1 addition & 0 deletions kasa/iot/iotbulb.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ class TurnOnBehaviors(DataClassDictMixin):
r"KL120\(EU\)": ColorTempRange(2700, 6500),
r"KL120\(US\)": ColorTempRange(2700, 5000),
r"KL400L5": ColorTempRange(2500, 9000),
r"KL420": ColorTempRange(2500, 9000),
r"KL430": ColorTempRange(2500, 9000),
}

Expand Down
10 changes: 7 additions & 3 deletions tests/device_fixtures.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,13 @@
"KL135",
"KL430",
}
# KL400L5 firmware 1.0.5 and 1.0.8 fixtures report no variable color temperature
# support, so match the supporting 1.0.11 fixture rather than the entire model.
BULBS_IOT_VARIABLE_TEMP_FIXTURES = {"KL400L5(US)_1.0_1.0.11"}
# KL400L5 firmware 1.0.5/1.0.8 and KL420L5 firmware 1.0.2 fixtures report no
# variable color temperature support, so match the supporting fixtures rather
# than the entire model.
BULBS_IOT_VARIABLE_TEMP_FIXTURES = {
"KL400L5(US)_1.0_1.0.11",
"KL420L5(US)_1.0_1.0.7",
}
BULBS_IOT_COLOR = {"LB130", "KL125", "KL130", "KL135", *BULBS_IOT_LIGHT_STRIP}
BULBS_IOT_DIMMABLE = {"KL50", "KL60", "LB100", "LB110", "KL110", "KL110B"}
BULBS_IOT = (
Expand Down
11 changes: 3 additions & 8 deletions tests/fixtureinfo.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,9 @@ def _model_match(fixture_data: FixtureInfo, model_filter: set[str]):
if isinstance(model_filter, str):
model_filter = {model_filter}
assert isinstance(model_filter, set), "model filter must be a set"
model_filter_list = [mf for mf in model_filter]
if (
len(model_filter_list) == 1
and (model := model_filter_list[0])
and len(model.split("_")) == 3
):
# filter string includes hw and fw, return exact match
return fixture_data.name == f"{model}.json"
fixture_base = fixture_data.name.removesuffix(".json")
if fixture_base in model_filter or fixture_data.name in model_filter:
return True
file_model_region = fixture_data.name.split("_")[0]
file_model = file_model_region.split("(")[0]
return file_model in model_filter
Expand Down
57 changes: 57 additions & 0 deletions tests/fixtures/iot/KL420L5(US)_1.0_1.0.7.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"smartlife.iot.common.emeter": {
"get_realtime": {
"err_code": 0,
"power_mw": 500,
"total_wh": 1192
}
},
"system": {
"get_sysinfo": {
"LEF": 1,
"active_mode": "none",
"alias": "#MASKED_NAME#",
"ctrl_protocols": {
"name": "Linkie",
"version": "1.0"
},
"description": "Kasa Smart Light Strip, Multicolor",
"dev_state": "normal",
"deviceId": "0000000000000000000000000000000000000000",
"disco_ver": "1.0",
"err_code": 0,
"hwId": "00000000000000000000000000000000",
"hw_ver": "1.0",
"is_color": 1,
"is_dimmable": 1,
"is_factory": false,
"is_variable_color_temp": 1,
"latitude_i": 0,
"length": 50,
"light_state": {
"brightness": 60,
"color_temp": 2700,
"hue": 0,
"mode": "normal",
"on_off": 1,
"saturation": 0
},
"lighting_effect_state": {
"brightness": 60,
"custom": 0,
"enable": 0,
"id": "CdLeIgiKcQrLKMINRPTMbylATulQewLD",
"name": "Aurora"
},
"longitude_i": 0,
"mic_mac": "00:00:00:00:00:00",
"mic_type": "IOT.SMARTBULB",
"model": "KL420L5(US)",
"oemId": "00000000000000000000000000000000",
"preferred_state": [],
"rssi": -19,
"status": "new",
"sw_ver": "1.0.7 Build 240809 Rel.170227"
}
}
}
Loading

Back | FazBrowse Home | New Git URL