diff --git a/README.md b/README.md index 000b20a..4e1e9e8 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,7 @@ Note: `configuration.yaml` is no longer supported and your configuration is not - AC4236 - AC4550 - AC4558 +- AC5660 - AC5659 - AMF765 - AMF870 @@ -212,6 +213,7 @@ The integration also provides the original Philips icons for your use in the fro | ![Preview](./custom_components/philips_airpurifier_coap/icons/pap/purification_only_mode.svg) | purification_only_mode | | ![Preview](./custom_components/philips_airpurifier_coap/icons/pap/two_in_one_mode.svg) | two_in_one_mode | | ![Preview](./custom_components/philips_airpurifier_coap/icons/pap/bacteria_virus_mode.svg) | bacteria_virus_mode | +| ![Preview](./custom_components/philips_airpurifier_coap/icons/pap/pollution_mode.svg) | pollution_mode | | ![Preview](./custom_components/philips_airpurifier_coap/icons/pap/nanoprotect_filter.svg) | nanoprotect_filter | | ![Preview](./custom_components/philips_airpurifier_coap/icons/pap/filter_replacement.svg) | filter_replacement | | ![Preview](./custom_components/philips_airpurifier_coap/icons/pap/water_refill.svg) | water_refill | diff --git a/custom_components/philips_airpurifier_coap/const.py b/custom_components/philips_airpurifier_coap/const.py index 738ab30..fb55d4e 100644 --- a/custom_components/philips_airpurifier_coap/const.py +++ b/custom_components/philips_airpurifier_coap/const.py @@ -60,6 +60,7 @@ class ICON(StrEnum): PURIFICATION_ONLY_MODE = "pap:purification_only_mode" TWO_IN_ONE_MODE = "pap:two_in_one_mode" BACTERIA_VIRUS_MODE = "pap:bacteria_virus_mode" + POLLUTION_MODE = "pap:pollution_mode" NANOPROTECT_FILTER = "pap:nanoprotect_filter" FILTER_REPLACEMENT = "pap:filter_replacement" WATER_REFILL = "pap:water_refill" @@ -139,6 +140,7 @@ class FanModel(StrEnum): AC4550 = "AC4550" AC4558 = "AC4558" AC5659 = "AC5659" + AC5660 = "AC5660" AMF765 = "AMF765" AMF870 = "AMF870" CX3550 = "CX3550" @@ -182,19 +184,19 @@ class PresetMode: AUTO: ICON.AUTO_MODE, AUTO_GENERAL: ICON.AUTO_MODE, BACTERIA: ICON.BACTERIA_VIRUS_MODE, + POLLUTION: ICON.POLLUTION_MODE, SPEED_GENTLE_1: ICON.SPEED_1, SPEED_1: ICON.SPEED_1, SPEED_2: ICON.SPEED_2, SPEED_3: ICON.SPEED_3, + TURBO: ICON.SPEED_3, # we use the sleep mode icon for all related modes GENTLE: ICON.SLEEP_MODE, NIGHT: ICON.SLEEP_MODE, SLEEP: ICON.SLEEP_MODE, - TURBO: ICON.SPEED_3, # unfortunately, the allergy sleep mode has the same icon as the auto mode on the device SLEEP_ALLERGY: ICON.AUTO_MODE, - # some devices have a gas and a pollution mode, but there doesn't seem to be a Philips icon for that - POLLUTION: ICON.AUTO_MODE, + # some devices have a gas mode, but there doesn't seem to be a Philips icon for that GAS: ICON.AUTO_MODE, } diff --git a/custom_components/philips_airpurifier_coap/icons/pap/pm25.svg b/custom_components/philips_airpurifier_coap/icons/pap/pm25.svg index d26157a..590ef5d 100644 --- a/custom_components/philips_airpurifier_coap/icons/pap/pm25.svg +++ b/custom_components/philips_airpurifier_coap/icons/pap/pm25.svg @@ -1,5 +1,5 @@ - + diff --git a/custom_components/philips_airpurifier_coap/icons/pap/pm25b.svg b/custom_components/philips_airpurifier_coap/icons/pap/pm25b.svg index b7acf73..91d4e9e 100644 --- a/custom_components/philips_airpurifier_coap/icons/pap/pm25b.svg +++ b/custom_components/philips_airpurifier_coap/icons/pap/pm25b.svg @@ -1,4 +1,4 @@ - + diff --git a/custom_components/philips_airpurifier_coap/icons/pap/pollution_mode.svg b/custom_components/philips_airpurifier_coap/icons/pap/pollution_mode.svg new file mode 100644 index 0000000..99c2bc4 --- /dev/null +++ b/custom_components/philips_airpurifier_coap/icons/pap/pollution_mode.svg @@ -0,0 +1,4 @@ + + + + diff --git a/custom_components/philips_airpurifier_coap/philips.py b/custom_components/philips_airpurifier_coap/philips.py index d7b86b2..79d3fae 100644 --- a/custom_components/philips_airpurifier_coap/philips.py +++ b/custom_components/philips_airpurifier_coap/philips.py @@ -1738,7 +1738,7 @@ class PhilipsAC5659(PhilipsGenericCoAPFan): """AC5659.""" AVAILABLE_PRESET_MODES = { - PresetMode.AUTO: {PhilipsApi.POWER: "1", PhilipsApi.MODE: "P"}, + PresetMode.POLLUTION: {PhilipsApi.POWER: "1", PhilipsApi.MODE: "P"}, PresetMode.ALLERGEN: {PhilipsApi.POWER: "1", PhilipsApi.MODE: "A"}, PresetMode.BACTERIA: {PhilipsApi.POWER: "1", PhilipsApi.MODE: "B"}, # make speeds available as preset @@ -1798,6 +1798,10 @@ class PhilipsAC5659(PhilipsGenericCoAPFan): AVAILABLE_SELECTS = [PhilipsApi.PREFERRED_INDEX] +class PhilipsAC5660(PhilipsAC5659): + """AC5660.""" + + class PhilipsAMFxxx(PhilipsNew2GenericCoAPFan): """AMF family.""" @@ -2061,6 +2065,7 @@ class PhilipsCX3550(PhilipsNew2GenericCoAPFan): FanModel.AC4550: PhilipsAC4550, FanModel.AC4558: PhilipsAC4558, FanModel.AC5659: PhilipsAC5659, + FanModel.AC5660: PhilipsAC5660, FanModel.AMF765: PhilipsAMF765, FanModel.AMF870: PhilipsAMF870, FanModel.CX5120: PhilipsCX5120,