Skip to content

Commit

Permalink
Fix purea9 (JohNan#72)
Browse files Browse the repository at this point in the history
* Add FRESH360 filter

debug logs show I have:
"FilterType": 100

which according to the APP is FRESH360

* fix name for eCO2

I think this should be adjusted, as the A9 doesn't return CO2. It does show ECO2 in the json.

* moved sensor to common array

after review from JohNan

* eCO2 is a common entity now
  • Loading branch information
hermanops authored Jan 28, 2024
1 parent b2f773b commit 09c995f
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions custom_components/wellbeing/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
67: "Breeze 360 filter",
96: "Breeze 360 filter",
99: "Breeze 360 filter",
100: "Fresh 360 filter",
192: "FRESH Odour protect filter",
0: "Filter"
}
Expand Down Expand Up @@ -118,12 +119,6 @@ def __init__(self, name, pnc_id, model) -> None:
@staticmethod
def _create_entities(data):
a7_entities = [
ApplianceSensor(
name="eCO2",
attr='ECO2',
unit=CONCENTRATION_PARTS_PER_MILLION,
device_class=SensorDeviceClass.CO2
),
ApplianceSensor(
name=f"{FILTER_TYPE.get(data.get('FilterType_1', 0), 'Unknown filter')} Life",
attr='FilterLife_1',
Expand All @@ -149,13 +144,7 @@ def _create_entities(data):
name=f"{FILTER_TYPE.get(data.get('FilterType', 0), 'Unknown filter')} Life",
attr='FilterLife',
unit=PERCENTAGE
),
ApplianceSensor(
name="CO2",
attr='CO2',
unit=CONCENTRATION_PARTS_PER_MILLION,
device_class=SensorDeviceClass.CO2
),
)
]

common_entities = [
Expand All @@ -174,6 +163,12 @@ def _create_entities(data):
attr='TVOC',
unit=CONCENTRATION_PARTS_PER_BILLION
),
ApplianceSensor(
name="eCO2",
attr='ECO2',
unit=CONCENTRATION_PARTS_PER_MILLION,
device_class=SensorDeviceClass.CO2
),
ApplianceSensor(
name="PM1",
attr='PM1',
Expand Down

0 comments on commit 09c995f

Please sign in to comment.