Skip to content

Commit

Permalink
fix base class for new models
Browse files Browse the repository at this point in the history
  • Loading branch information
kongo09 committed Jan 10, 2024
1 parent 84148c6 commit 9024a3f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions custom_components/philips_airpurifier_coap/philips.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ def __init__(self, coordinator: Coordinator) -> None: # noqa: D107
self._name = list(
filter(
None,
map(coordinator.status.get, [PhilipsApi.NAME, PhilipsApi.NEW_NAME]),
map(
coordinator.status.get,
[PhilipsApi.NAME, PhilipsApi.NEW_NAME, PhilipsApi.NEW2_NAME],
),
)
)[0]
# self._modelName = coordinator.status["modelid"]
Expand All @@ -192,7 +195,11 @@ def __init__(self, coordinator: Coordinator) -> None: # noqa: D107
None,
map(
coordinator.status.get,
[PhilipsApi.MODEL_ID, PhilipsApi.NEW_MODEL_ID],
[
PhilipsApi.MODEL_ID,
PhilipsApi.NEW_MODEL_ID,
PhilipsApi.NEW2_MODEL_ID,
],
),
)
)[0]
Expand Down

0 comments on commit 9024a3f

Please sign in to comment.