ToddGreenfield / homebridge-airnow

Homebridge plugin for AirNow Web-API Air Quality Sensor
36 stars 10 forks source link

calculate concentrations based on AirNow AQI #15

Open keithws opened 2 years ago

keithws commented 2 years ago

I added code to calculate concentrations for PM2.5, PM10, and Ozone based on the AQI values in the response from the AirNow API call. I used the same equations as found in the AirNow Calculator which were derived from the official Technical Assistance Document for the Reporting of Daily Air Quality.

I also added a new configuration option to show AQI instead of the concentrations for those that are used to the old behavior. The config option is called, "show_aqi" and it defaults to false.

This should address issue #8.