Skip to content

Commit 07e2249

Browse files
authored
Add LPH64 for LPH-MAX model (#24)
* Add LPH64 for LPH-MAX model * Update test device types
1 parent 0948fa8 commit 07e2249

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,6 @@ cython_debug/
165165
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166166
# and can be added to the global gitignore or merged into this file. For a more nuclear
167167
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
168-
#.idea/
168+
#.idea/
169+
170+
scratchpad.py

letpot/converters.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def get_light_brightness_levels(self) -> list[int]:
235235
return []
236236

237237

238-
class LPH6xConverter(LetPotDeviceConverter):
238+
class LPHMaxLowerConverter(LetPotDeviceConverter):
239239
"""Converters and info for device type LPH60, LPH61, LPH62 (Max)."""
240240

241241
@staticmethod
@@ -318,12 +318,12 @@ def get_light_brightness_levels(self) -> list[int]:
318318
return [0, 125, 250, 375, 500, 625, 750, 875, 1000]
319319

320320

321-
class LPH63Converter(LetPotDeviceConverter):
322-
"""Converters and info for device type LPH63 (Max)."""
321+
class LPHMaxHigherConverter(LetPotDeviceConverter):
322+
"""Converters and info for device type LPH63, LPH64 (Max)."""
323323

324324
@staticmethod
325325
def supports_type(device_type: str) -> bool:
326-
return device_type in ["LPH63"]
326+
return device_type in ["LPH63", "LPH64"]
327327

328328
def get_device_model(self) -> tuple[str, str] | None:
329329
return MODEL_MAX
@@ -399,6 +399,6 @@ def get_light_brightness_levels(self) -> list[int]:
399399
CONVERTERS: Sequence[type[LetPotDeviceConverter]] = [
400400
LPHx1Converter,
401401
IGSorAltConverter,
402-
LPH6xConverter,
403-
LPH63Converter,
402+
LPHMaxLowerConverter,
403+
LPHMaxHigherConverter,
404404
]

tests/test_converter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"LPH61",
2020
"LPH62",
2121
"LPH63",
22+
"LPH64",
2223
]
2324

2425

0 commit comments

Comments
 (0)