From 9ea763b0deacab64c1a846626b367826fe79002d Mon Sep 17 00:00:00 2001 From: kongo09 Date: Fri, 16 Feb 2024 23:11:46 +0100 Subject: [PATCH] add AC3737 --- README.md | 1 + .../philips_airpurifier_coap/const.py | 1 + .../philips_airpurifier_coap/philips.py | 39 +++++++++++++++++++ 3 files changed, 41 insertions(+) diff --git a/README.md b/README.md index de892a8..18a8bd7 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,7 @@ Note: `configuration.yaml` is no longer supported and your configuration is not - AC3055 - AC3059 - AC3259 +- AC3737 - AC3829 - AC3836 - AC3854/50 diff --git a/custom_components/philips_airpurifier_coap/const.py b/custom_components/philips_airpurifier_coap/const.py index ffab8b5..09333e0 100644 --- a/custom_components/philips_airpurifier_coap/const.py +++ b/custom_components/philips_airpurifier_coap/const.py @@ -112,6 +112,7 @@ class FanModel(StrEnum): AC3055 = "AC3055" AC3059 = "AC3059" AC3259 = "AC3259" + AC3737 = "AC3737" AC3829 = "AC3829" AC3836 = "AC3836" AC3854_50 = "AC3854/50" diff --git a/custom_components/philips_airpurifier_coap/philips.py b/custom_components/philips_airpurifier_coap/philips.py index 13908a5..463523b 100644 --- a/custom_components/philips_airpurifier_coap/philips.py +++ b/custom_components/philips_airpurifier_coap/philips.py @@ -1178,6 +1178,44 @@ class PhilipsAC3259(PhilipsGenericCoAPFan): AVAILABLE_SELECTS = [PhilipsApi.GAS_PREFERRED_INDEX] +class PhilipsAC3737(PhilipsNew2GenericCoAPFan): + """AC3737.""" + + AVAILABLE_PRESET_MODES = { + # PresetMode.AUTO: { + # PhilipsApi.NEW2_POWER: 1, + # PhilipsApi.NEW2_MODE_A: 3, + # PhilipsApi.NEW2_MODE_B: 0, + # }, + # PresetMode.HIGH: { + # PhilipsApi.POWER: 1, + # PhilipsApi.NEW2_MODE_A: 3, + # PhilipsApi.NEW2_MODE_B: 65, + # }, + # PresetMode.LOW: { + # PhilipsApi.POWER: 1, + # PhilipsApi.NEW2_MODE_A: 3, + # PhilipsApi.NEW2_MODE_B: 66, + # }, + } + AVAILABLE_SPEEDS = { + # PresetMode.HIGH: { + # PhilipsApi.POWER: 1, + # PhilipsApi.NEW2_MODE_A: 3, + # PhilipsApi.NEW2_MODE_B: 65, + # }, + # PresetMode.LOW: { + # PhilipsApi.POWER: 1, + # PhilipsApi.NEW2_MODE_A: 3, + # PhilipsApi.NEW2_MODE_B: 66, + # }, + } + + AVAILABLE_LIGHTS = [PhilipsApi.NEW2_DISPLAY_BACKLIGHT2] + AVAILABLE_SWITCHES = [PhilipsApi.NEW2_CHILD_LOCK] + UNAVAILABLE_SENSORS = [PhilipsApi.NEW2_FAN_SPEED] + + class PhilipsAC3829(PhilipsHumidifierMixin, PhilipsGenericCoAPFan): """AC3829.""" @@ -1749,6 +1787,7 @@ class PhilipsCX5120(PhilipsNew2GenericCoAPFan): FanModel.AC3055: PhilipsAC3055, FanModel.AC3059: PhilipsAC3059, FanModel.AC3259: PhilipsAC3259, + FanModel.AC3737: PhilipsAC3737, FanModel.AC3829: PhilipsAC3829, FanModel.AC3836: PhilipsAC3836, FanModel.AC3854_50: PhilipsAC385450,