Air quality in Home Assistant
The integration adds your city's air quality to Home Assistant as sensors refreshed every 15 minutes. Show them on dashboards and use them in automations, for example to turn on an air purifier or to close the windows. No account or key.
Install
With HACS: HACS → ⋮ → Custom repositories, add this address with the category Integration, install Atmy Air Quality and restart Home Assistant.
https://github.com/Atmy-ai/atmy-home-assistantManually: download the archive, copy the atmy folder into config/custom_components/ and restart Home Assistant.
Add a city
Settings → Devices & services → Add integration → Atmy. Leave the field empty to use the city nearest to your home, or type a city name in any language. Add the integration again for each more city.
Sensors
pm2_5— the city's mean PM2.5 now, µg/m³us_aqi— the US EPA air quality indexair_quality— the level from good to hazardouspm2_5_yesterday— the mean of the last completed daypollution_accumulation— 0–100, how strongly the weather keeps particles near the ground, with the next 24 hours in the attributestemperature, humidity, pressure, wind_speed, wind_gusts— the weather now from Atmy's records
Automation example
Turn on the air purifier when PM2.5 in the city stays above 35 µg/m³ for half an hour:
automation:
- alias: Air purifier when the city air is bad
triggers:
- trigger: numeric_state
entity_id: sensor.berlin_germany_pm2_5
above: 35
for: "00:30:00"
actions:
- action: fan.turn_on
target:
entity_id: fan.air_purifierThe values are approximate: low-cost optical sensors after the Data Hub quality check, not official monitoring. How the values are computed: methodology