This is a custom Home Assistant integration that connects to the OpenAQ API to provide real-time air quality data from thousands of monitoring stations worldwide.
- 🌫️ Fetches live air quality data (PM1, PM2.5, PM10, CO, NO₂, SO₂, O₃, CO₂, etc.)
- 🧭 Calculates US AQI (Air Quality Index) automatically
- 📊 Exposes AQI value, level, and main pollutant as sensors
- 🕒 Updates automatically every 5 minutes
- ⚙️ Multi-station support (up to 3 stations)
- 🧹 Cleanly handles station removal from UI
- 🪶 Lightweight and fully async (no YAML required)
- 🌍 Available in English and Romanian
- Copy the folder
custom_components/openaqinto your Home Assistant config directory:/config/custom_components/openaq/ - Restart Home Assistant
- Go to Settings → Devices & Services → Add Integration → OpenAQ
- Enter your OpenAQ API Key (get one free from OpenAQ)
- Enter the Station ID (for example:
2163078) - Done — your sensors will appear automatically.
To add more stations later:
Go to the gear icon (Options) in the integration → Add another Station ID.
Each station will appear as a device under the OpenAQ integration and expose multiple sensor entities, including:
| Sensor | Description | Unit |
|---|---|---|
| PM1 | Particulate Matter ≤1 μm | µg/m³ |
| PM2.5 | Particulate Matter ≤2.5 μm | µg/m³ |
| PM10 | Particulate Matter ≤10 μm | µg/m³ |
| CO₂ | Carbon Dioxide | ppm |
| CO | Carbon Monoxide | ppm |
| NO₂ | Nitrogen Dioxide | µg/m³ |
| O₃ | Ozone | µg/m³ |
| SO₂ | Sulfur Dioxide | µg/m³ |
| AQI | U.S. Air Quality Index | 0–500 |
| AQI Level | Text description (Good / Moderate / Unhealthy, etc.) | — |
| AQI Main Pollutant | Parameter that defines AQI | — |
- Latest measurements: every 5 minutes
- Station metadata: every 12 hours
If Home Assistant fails to start after deleting a station:
- Make sure your internet connection allows outbound HTTPS to
api.openaq.org.
If no data appears:
- Check your API key validity.
- Verify that the Station ID exists in OpenAQ Explorer.
Contributions, issues, and feature requests are welcome!
Feel free to open an issue or submit a Pull Request.
This project is distributed under the MIT License.
- OpenAQ for providing open, public air quality data
- Home Assistant for the integration framework
(screenshots incoming)
© 2025 zenguru84 — OpenAQ Home Assistant Integration
