[aqi] Implement a sensor that computes AQI (#12958)

Co-authored-by: jas <jas@asspa.in>
This commit is contained in:
Jas Strong
2026-01-06 13:31:50 -08:00
committed by GitHub
parent 4419bf02b1
commit 412ab5dbbf
14 changed files with 193 additions and 74 deletions

View File

@@ -0,0 +1,22 @@
sensor:
- platform: template
id: pm25_sensor
name: "PM2.5"
lambda: "return 25.0;"
- platform: template
id: pm10_sensor
name: "PM10"
lambda: "return 50.0;"
- platform: aqi
name: "Air Quality Index (AQI)"
pm_2_5: pm25_sensor
pm_10_0: pm10_sensor
calculation_type: AQI
- platform: aqi
name: "Air Quality Index (CAQI)"
pm_2_5: pm25_sensor
pm_10_0: pm10_sensor
calculation_type: CAQI

View File

@@ -0,0 +1 @@
<<: !include common.yaml

View File

@@ -0,0 +1 @@
<<: !include common.yaml

View File

@@ -0,0 +1 @@
<<: !include common.yaml

View File

@@ -25,7 +25,4 @@ sensor:
name: Particulate Count >5.0um
pm_10_0um:
name: Particulate Count >10.0um
aqi:
name: AQI
calculation_type: AQI
update_interval: 30s