Skip to content

Commit

Permalink
Merge pull request #7 from kongo09/ac303x
Browse files Browse the repository at this point in the history
add AC3036
  • Loading branch information
kongo09 authored Apr 9, 2022
2 parents fe15b06 + 131346e commit b4a2d81
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Currently only encrypted-CoAP is implemented.
## BREAKING CHANGE:

I've switched to the branch of Denaun. This brings a number of breaking changes:
- In your configuration, you no longer configure a `fan` with platform `philips_airpurifier_coap` but you configure `philips_airpurifier_coap` directly. See below for an example.
- The long list of attributes is now split out to a number of sensors. If you rely on them, you need to change your frontend, scripts and automations.
- The speed setting is now seperated from the preset modes, more inline with how fans are treated inside HA.

Expand Down Expand Up @@ -60,6 +59,7 @@ Note: `configuration.yaml` is no longer supported and your configuration is not
- AC2939
- AC2958
- AC3033
- AC3036
- AC3039
- AC3059
- AC3259
Expand Down
1 change: 1 addition & 0 deletions custom_components/philips_airpurifier_coap/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class ICON:
MODEL_AC2939 = "AC2939"
MODEL_AC2958 = "AC2958"
MODEL_AC3033 = "AC3033"
MODEL_AC3036 = "AC3036"
MODEL_AC3039 = "AC3039"
MODEL_AC3059 = "AC3059"
MODEL_AC3259 = "AC3259"
Expand Down
2 changes: 1 addition & 1 deletion custom_components/philips_airpurifier_coap/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"requirements": [
"aioairctrl @ git+https://github.com/kongo09/aioairctrl"
],
"version": "0.9.1"
"version": "0.9.2"
}
32 changes: 11 additions & 21 deletions custom_components/philips_airpurifier_coap/philips.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ class PhilipsAC2958(PhilipsGenericCoAPFan):
}


class PhilipsAC3033(PhilipsGenericCoAPFan):
class PhilipsAC30xx(PhilipsGenericCoAPFan):
AVAILABLE_PRESET_MODES = {
PRESET_MODE_AUTO: {PHILIPS_POWER: "1", PHILIPS_MODE: "AG"},
PRESET_MODE_SLEEP: {PHILIPS_POWER: "1", PHILIPS_MODE: "S", PHILIPS_SPEED: "s"},
Expand All @@ -456,28 +456,17 @@ class PhilipsAC3033(PhilipsGenericCoAPFan):
}


class PhilipsAC3039(PhilipsGenericCoAPFan):
AVAILABLE_PRESET_MODES = {
PRESET_MODE_AUTO: {PHILIPS_POWER: "1", PHILIPS_MODE: "AG"},
PRESET_MODE_SLEEP: {PHILIPS_POWER: "1", PHILIPS_MODE: "S", PHILIPS_SPEED: "s"},
}
AVAILABLE_SPEEDS = {
SPEED_1: {PHILIPS_POWER: "1", PHILIPS_MODE: "M", PHILIPS_SPEED: "1"},
SPEED_2: {PHILIPS_POWER: "1", PHILIPS_MODE: "M", PHILIPS_SPEED: "2"},
PRESET_MODE_TURBO: {PHILIPS_POWER: "1", PHILIPS_MODE: "T", PHILIPS_SPEED: "t"},
}
class PhilipsAC3033(PhilipsAC30xx):
pass

class PhilipsAC3036(PhilipsAC30xx):
pass

class PhilipsAC3059(PhilipsGenericCoAPFan):
AVAILABLE_PRESET_MODES = {
PRESET_MODE_AUTO: {PHILIPS_POWER: "1", PHILIPS_MODE: "AG"},
PRESET_MODE_SLEEP: {PHILIPS_POWER: "1", PHILIPS_MODE: "S", PHILIPS_SPEED: "s"},
}
AVAILABLE_SPEEDS = {
SPEED_1: {PHILIPS_POWER: "1", PHILIPS_MODE: "M", PHILIPS_SPEED: "1"},
SPEED_2: {PHILIPS_POWER: "1", PHILIPS_MODE: "M", PHILIPS_SPEED: "2"},
PRESET_MODE_TURBO: {PHILIPS_POWER: "1", PHILIPS_MODE: "T", PHILIPS_SPEED: "t"},
}
class PhilipsAC3039(PhilipsAC30xx):
pass

class PhilipsAC3059(PhilipsAC30xx):
pass


class PhilipsAC3259(PhilipsGenericCoAPFan):
Expand Down Expand Up @@ -556,6 +545,7 @@ class PhilipsAC5659(PhilipsGenericCoAPFan):
MODEL_AC2939: PhilipsAC2939,
MODEL_AC2958: PhilipsAC2958,
MODEL_AC3033: PhilipsAC3033,
MODEL_AC3036: PhilipsAC3036,
MODEL_AC3039: PhilipsAC3039,
MODEL_AC3059: PhilipsAC3059,
MODEL_AC3259: PhilipsAC3259,
Expand Down

0 comments on commit b4a2d81

Please sign in to comment.