From 77fc6c10130a4eb0868728b6ce6552e1e293633e Mon Sep 17 00:00:00 2001 From: hermanops <55062051+hermanops@users.noreply.github.com> Date: Mon, 22 Jan 2024 19:02:14 +0100 Subject: [PATCH 1/4] Add FRESH360 filter debug logs show I have: "FilterType": 100 which according to the APP is FRESH360 --- custom_components/wellbeing/api.py | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/wellbeing/api.py b/custom_components/wellbeing/api.py index c2e71c5..2adcef0 100644 --- a/custom_components/wellbeing/api.py +++ b/custom_components/wellbeing/api.py @@ -35,6 +35,7 @@ 64: "Breeze 360 filter", 96: "Breeze 360 filter", 99: "Breeze 360 filter", + 100: "Fresh 360 filter", 192: "FRESH Odour protect filter", 0: "Filter" } From 96ab629b584da61e95698b4adc7fc947b91298fa Mon Sep 17 00:00:00 2001 From: hermanops <55062051+hermanops@users.noreply.github.com> Date: Mon, 22 Jan 2024 19:04:03 +0100 Subject: [PATCH 2/4] fix name for eCO2 I think this should be adjusted, as the A9 doesn't return CO2. It does show ECO2 in the json. --- custom_components/wellbeing/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/wellbeing/api.py b/custom_components/wellbeing/api.py index 2adcef0..befc445 100644 --- a/custom_components/wellbeing/api.py +++ b/custom_components/wellbeing/api.py @@ -151,8 +151,8 @@ def _create_entities(data): unit=PERCENTAGE ), ApplianceSensor( - name="CO2", - attr='CO2', + name="eCO2", + attr='ECO2', unit=CONCENTRATION_PARTS_PER_MILLION, device_class=SensorDeviceClass.CO2 ), From 5871e76c46d74434433002347c1496579dfd9268 Mon Sep 17 00:00:00 2001 From: hermanops <55062051+hermanops@users.noreply.github.com> Date: Sat, 27 Jan 2024 19:29:18 +0100 Subject: [PATCH 3/4] moved sensor to common array after review from JohNan --- custom_components/wellbeing/api.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/custom_components/wellbeing/api.py b/custom_components/wellbeing/api.py index befc445..1f7ba96 100644 --- a/custom_components/wellbeing/api.py +++ b/custom_components/wellbeing/api.py @@ -149,13 +149,7 @@ def _create_entities(data): name=f"{FILTER_TYPE.get(data.get('FilterType', 0), 'Unknown filter')} Life", attr='FilterLife', unit=PERCENTAGE - ), - ApplianceSensor( - name="eCO2", - attr='ECO2', - unit=CONCENTRATION_PARTS_PER_MILLION, - device_class=SensorDeviceClass.CO2 - ), + ) ] common_entities = [ @@ -174,6 +168,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', From 02305d5d157a0e38a83be065127b6d08c676eb91 Mon Sep 17 00:00:00 2001 From: hermanops <55062051+hermanops@users.noreply.github.com> Date: Sat, 27 Jan 2024 22:17:24 +0100 Subject: [PATCH 4/4] eCO2 is a common entity now --- custom_components/wellbeing/api.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/custom_components/wellbeing/api.py b/custom_components/wellbeing/api.py index 8d961b4..2bf997c 100644 --- a/custom_components/wellbeing/api.py +++ b/custom_components/wellbeing/api.py @@ -119,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',