From 3ca74dc4a2a716155c356717ee9ccd0618178a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joris=20Pelgr=C3=B6m?= Date: Fri, 24 Oct 2025 11:59:14 +0200 Subject: [PATCH 1/2] Add LPH64 for LPH-MAX model --- .gitignore | 4 +++- letpot/converters.py | 12 ++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 9cc511e..3da4a21 100644 --- a/.gitignore +++ b/.gitignore @@ -165,4 +165,6 @@ cython_debug/ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ \ No newline at end of file +#.idea/ + +scratchpad.py \ No newline at end of file diff --git a/letpot/converters.py b/letpot/converters.py index db43a95..7055490 100644 --- a/letpot/converters.py +++ b/letpot/converters.py @@ -235,7 +235,7 @@ def get_light_brightness_levels(self) -> list[int]: return [] -class LPH6xConverter(LetPotDeviceConverter): +class LPHMaxLowerConverter(LetPotDeviceConverter): """Converters and info for device type LPH60, LPH61, LPH62 (Max).""" @staticmethod @@ -318,12 +318,12 @@ def get_light_brightness_levels(self) -> list[int]: return [0, 125, 250, 375, 500, 625, 750, 875, 1000] -class LPH63Converter(LetPotDeviceConverter): - """Converters and info for device type LPH63 (Max).""" +class LPHMaxHigherConverter(LetPotDeviceConverter): + """Converters and info for device type LPH63, LPH64 (Max).""" @staticmethod def supports_type(device_type: str) -> bool: - return device_type in ["LPH63"] + return device_type in ["LPH63", "LPH64"] def get_device_model(self) -> tuple[str, str] | None: return MODEL_MAX @@ -399,6 +399,6 @@ def get_light_brightness_levels(self) -> list[int]: CONVERTERS: Sequence[type[LetPotDeviceConverter]] = [ LPHx1Converter, IGSorAltConverter, - LPH6xConverter, - LPH63Converter, + LPHMaxLowerConverter, + LPHMaxHigherConverter, ] From fa2510c1040b4d4f48081ccf8b4ea4a06f7b17de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joris=20Pelgr=C3=B6m?= Date: Fri, 24 Oct 2025 12:50:56 +0200 Subject: [PATCH 2/2] Update test device types --- tests/test_converter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_converter.py b/tests/test_converter.py index d3c3d3d..b33583b 100644 --- a/tests/test_converter.py +++ b/tests/test_converter.py @@ -19,6 +19,7 @@ "LPH61", "LPH62", "LPH63", + "LPH64", ]