Add KL420 to TPLINK_KELVIN color temperature ranges (#1757)

Adds the `KL420` series to `TPLINK_KELVIN` to support wider color temperature ranges (2500-9000K as supported by the device).
While older firmware (1.0.2) reported is_variable_color_temp: 0, firmware 1.0.7 enables variable color temperature support.
This commit is contained in:
Peter Arapov
2026-09-18 08:38:08 -05:00
committed by GitHub
parent 0e3640c303
commit 7164ef7a66
5 changed files with 69 additions and 11 deletions

View File

@@ -129,14 +129,9 @@ def filter_fixtures(
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