From de4cb364dabea1cabce2bbb640b2ff499fdee46d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Nenz=C3=A9n?= Date: Sat, 3 Feb 2024 22:06:24 +0100 Subject: [PATCH] Add back the CO2 sensor for backwards compatibility --- custom_components/wellbeing/api.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/custom_components/wellbeing/api.py b/custom_components/wellbeing/api.py index 2bf997c..d307334 100644 --- a/custom_components/wellbeing/api.py +++ b/custom_components/wellbeing/api.py @@ -144,7 +144,13 @@ 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 = [