detrout / scaqmd_sensor

home-assistant sensor to watch South Coast AQMD's AQI and Forecast

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction

This is a small web sensor to poll the California South Coast Air Quality Management Districits OpenData feed for current and forecast air quality.

Installation

It is currently implemented as a custom sensor. You need to add the scaqmd.py file (or a symlink to the file) to your homeassistant configuration directory in the custom_components/sensors/ directory

Usage

To enable the sensor you need to add it to your sensors block. as a platform.

The most important option is station which is the numeric ID for the SC AQMD region you're interested in. The Current Air Quality Map shows the regions with their numeric IDs.

For instance Long Beach is in region 4.

The next option is the mode flag

The default is current for a sensor that is reporting the current AQI reading for this hour.

mode: forecast will return tomorrows AQI forecast.

current_url and forecast_url allow overriding the arggis open dataset urls, but I don't expect overriding them will be that useful since the other air quality districts seem to format their data differently.

Usage Example

Here is a complete configuration showing the current and forecast conditions for Long Beach

sensors:
    - platform: scaqmd
      station: 4
    - platform: scaqmd
      station: 4
      mode: forecast

About

home-assistant sensor to watch South Coast AQMD's AQI and Forecast

License:Apache License 2.0


Languages

Language:Jupyter Notebook 50.4%Language:HTML 38.4%Language:Python 11.2%