From 73bea1e15bea6e706301cc636b54d5c6ca5a6ca3 Mon Sep 17 00:00:00 2001 From: amaurylam <103258109+amaurylam@users.noreply.github.com> Date: Sun, 29 Dec 2024 21:55:40 +0100 Subject: [PATCH] Update sensor.py - add WH46's PM1 and PM4 sensors support --- aioecowitt/sensor.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/aioecowitt/sensor.py b/aioecowitt/sensor.py index 84757e7..868e904 100644 --- a/aioecowitt/sensor.py +++ b/aioecowitt/sensor.py @@ -77,7 +77,9 @@ class EcoWittSensorTypes(enum.Enum): LUX = 28 PERCENTAGE = 29 SOIL_RAWADC = 30 - + PM1 = 31 + PM4 = 32 + @dataclass class EcoWittMapping: @@ -248,6 +250,10 @@ class EcoWittMapping: "tf_co2": EcoWittMapping("WH45 Temperature", EcoWittSensorTypes.TEMPERATURE_F), "tf_co2c": EcoWittMapping("WH45 Temperature", EcoWittSensorTypes.TEMPERATURE_C), "humi_co2": EcoWittMapping("WH45 Humidity", EcoWittSensorTypes.HUMIDITY), + "pm1_co2": EcoWittMapping("WH46 PM1 CO2", EcoWittSensorTypes.PM1), + "pm1_24h_co2": EcoWittMapping("WH46 PM1 CO2 24h average", EcoWittSensorTypes.PM1), + "pm4_co2": EcoWittMapping("WH46 PM4 CO2", EcoWittSensorTypes.PM4), + "pm4_24h_co2": EcoWittMapping("WH46 PM4 CO2 24h average", EcoWittSensorTypes.PM4), "pm25_co2": EcoWittMapping("WH45 PM2.5 CO2", EcoWittSensorTypes.PM25), "pm25_24h_co2": EcoWittMapping( "WH45 PM2.5 CO2 24h average", EcoWittSensorTypes.PM25