mirror of
https://github.com/esphome/esphome.git
synced 2026-02-18 15:35:59 -07:00
[aqi] Implement a sensor that computes AQI (#12958)
Co-authored-by: jas <jas@asspa.in>
This commit is contained in:
22
tests/components/aqi/common.yaml
Normal file
22
tests/components/aqi/common.yaml
Normal 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
|
||||
1
tests/components/aqi/test.esp32-idf.yaml
Normal file
1
tests/components/aqi/test.esp32-idf.yaml
Normal file
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
||||
1
tests/components/aqi/test.esp8266-ard.yaml
Normal file
1
tests/components/aqi/test.esp8266-ard.yaml
Normal file
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
||||
1
tests/components/aqi/test.rp2040-ard.yaml
Normal file
1
tests/components/aqi/test.rp2040-ard.yaml
Normal file
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user