Create Airparif previsions sensors in Homeassistant
Report Bug
·
Request Feature
This project provides an unofficial Homeassistant integration for Airparif data.
This integration retrieves the data from the official Airparif API and requires an official API key obtainable from Airparif on this page.
To get up and running follow these simple steps.
You need to know the INSEE code for the cities you want to integrate.
Note that the INSEE code is different from the city postal code.
It can be found on the INSEE website or with a quick Google search.
For instance, Paris' first arrondissement INSEE code is 75101.
-
Copy the
custom_components/airparif
folder into yourcustom_components
folder. -
Add the following configuration in your configuration file:
sensor:
- platform: airparif
token: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
locations:
- 75101
- 75102
- Restart your Homeassistant instance.
A sensor is created for each location defined in the configuration.
For now, the integration provides pollution indexes for the current and the next day:
today:
date: '2021-08-22'
pm_2_5: Bon
pm_10: Bon
ozone: Moyen
nitrogen_dioxide: Bon
sulfur_dioxide: Bon
aqi: Moyen
tomorrow:
date: '2021-08-23'
pm_2_5: Bon
pm_10: Bon
ozone: Moyen
nitrogen_dioxide: Bon
sulfur_dioxide: Bon
aqi: Moyen
friendly_name: Airparif 75101
icon: mdi:cloud
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
This repository is based on:
- The official WAQI integration
- The custom_component/integration_blueprint project