diff --git a/custom_components/wellbeing/api.py b/custom_components/wellbeing/api.py index 7947641..2bf997c 100644 --- a/custom_components/wellbeing/api.py +++ b/custom_components/wellbeing/api.py @@ -30,10 +30,13 @@ FILTER_TYPE = { 48: "BREEZE Complete air filter", + 49: "CLEAN Ultrafine particle filter", 51: "CARE Ultimate protect filter", 64: "Breeze 360 filter", + 67: "Breeze 360 filter", 96: "Breeze 360 filter", 99: "Breeze 360 filter", + 100: "Fresh 360 filter", 192: "FRESH Odour protect filter", 0: "Filter" } @@ -117,18 +120,12 @@ def __init__(self, name, pnc_id, model) -> None: 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[data.get('FilterType_1', 0)]} Life", + name=f"{FILTER_TYPE.get(data.get('FilterType_1', 0), 'Unknown filter')} Life", attr='FilterLife_1', unit=PERCENTAGE ), ApplianceSensor( - name=f"{FILTER_TYPE[data.get('FilterType_2', 0)]} Life", + name=f"{FILTER_TYPE.get(data.get('FilterType_2', 0), 'Unknown filter')} Life", attr='FilterLife_2', unit=PERCENTAGE ), @@ -144,16 +141,10 @@ def _create_entities(data): a9_entities = [ ApplianceSensor( - name=f"{FILTER_TYPE.get(data.get('FilterType', 0), 'Filter')} Life", + 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 = [ @@ -172,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',