ToddGreenfield / homebridge-airnow

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

Option for EU criteria #9

Open nielsth opened 5 years ago

nielsth commented 5 years ago

Currently the labels assigned to the current air quality are based on US standards.

In the EU, the criteria AQI levels are based on values of NO2, PM10, O3 and optionally PM2.5 and a bit more strict that the US. The ug/m3 values are converted to a sub-index level, and (similar to the US) the sub index that represents the worst quality defines the current AQI.

This currently results in the air quality being rated too positive when EU values are indexed by the current US standards. (Aside from the fact that the AQI based on AQICN values is miscalculated anyway, as outlined in Issue #8).

See https://en.wikipedia.org/wiki/Air_quality_index#Europe

ToddGreenfield commented 5 years ago

A config parameter could be added to use alternative standards such as the EU uses and additional logic added to trans function pretty easily. I dont have time to do this, so feel free to submit a PR.