Skip to content

Commit

Permalink
fix settings for CX3120
Browse files Browse the repository at this point in the history
  • Loading branch information
kongo09 committed Dec 3, 2024
1 parent 22810ac commit b9963f8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
4 changes: 4 additions & 0 deletions custom_components/philips_airpurifier_coap/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@ class PhilipsApi:
SWITCH_ON: [17242, 23040],
SWITCH_OFF: 0,
}
OSCILLATION_MAP3 = {
SWITCH_ON: "45",
SWITCH_OFF: "0",
}

# the AC1715 seems to follow a new scheme, this should later be refactored
NEW_NAME = "D01-03"
Expand Down
16 changes: 13 additions & 3 deletions custom_components/philips_airpurifier_coap/philips.py
Original file line number Diff line number Diff line change
Expand Up @@ -1805,7 +1805,7 @@ class PhilipsCX3120(PhilipsNew2GenericFan):
"""CX3120."""

AVAILABLE_PRESET_MODES = {
PresetMode.AUTO: {
PresetMode.AUTO_PLUS: {
PhilipsApi.NEW2_POWER: 1,
PhilipsApi.NEW2_MODE_A: 3,
PhilipsApi.NEW2_MODE_B: 0,
Expand All @@ -1815,6 +1815,11 @@ class PhilipsCX3120(PhilipsNew2GenericFan):
PhilipsApi.NEW2_MODE_A: 3,
PhilipsApi.NEW2_MODE_B: 65,
},
PresetMode.MEDIUM: {
PhilipsApi.NEW2_POWER: 1,
PhilipsApi.NEW2_MODE_A: 3,
PhilipsApi.NEW2_MODE_B: 67,
},
PresetMode.LOW: {
PhilipsApi.NEW2_POWER: 1,
PhilipsApi.NEW2_MODE_A: 3,
Expand All @@ -1832,18 +1837,23 @@ class PhilipsCX3120(PhilipsNew2GenericFan):
PhilipsApi.NEW2_MODE_A: 3,
PhilipsApi.NEW2_MODE_B: 65,
},
PresetMode.MEDIUM: {
PhilipsApi.NEW2_POWER: 1,
PhilipsApi.NEW2_MODE_A: 3,
PhilipsApi.NEW2_MODE_B: 67,
},
PresetMode.LOW: {
PhilipsApi.NEW2_POWER: 1,
PhilipsApi.NEW2_MODE_A: 3,
PhilipsApi.NEW2_MODE_B: 66,
},
}
KEY_OSCILLATION = {
PhilipsApi.NEW2_OSCILLATION: PhilipsApi.OSCILLATION_MAP,
PhilipsApi.NEW2_OSCILLATION: PhilipsApi.OSCILLATION_MAP3,
}

UNAVAILABLE_SENSORS = [PhilipsApi.NEW2_FAN_SPEED, PhilipsApi.NEW2_GAS]
AVAILABLE_SELECTS = [PhilipsApi.NEW2_TIMER2]
AVAILABLE_SELECTS = [PhilipsApi.NEW2_TIMER2, PhilipsApi.NEW2_CHILD_LOCK]
AVAILABLE_NUMBERS = [PhilipsApi.NEW2_TARGET_TEMP]


Expand Down

0 comments on commit b9963f8

Please sign in to comment.