Skip to content

Commit

Permalink
Update sensor.py - add WH46's PM1 and PM4 sensors support
Browse files Browse the repository at this point in the history
  • Loading branch information
amaurylam authored Dec 29, 2024
1 parent 8c8c6c1 commit 73bea1e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion aioecowitt/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ class EcoWittSensorTypes(enum.Enum):
LUX = 28
PERCENTAGE = 29
SOIL_RAWADC = 30

PM1 = 31
PM4 = 32


@dataclass
class EcoWittMapping:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 73bea1e

Please sign in to comment.