AQI calculations in HA #36
Replies: 2 comments
-
This would be great to have! |
Beta Was this translation helpful? Give feedback.
-
Here is the code for my outdoor AirLink: ... template:
... Pasted into your configuration.yaml it will return a US EPA AirNow AQI value. Note: The other change I made was to the actual python code in one module to return the 1 minute AQI rather than the NowCast AQI. in the sensor_air_quality.py file. You can do that by looking for the following line (130): … … I commented out the _nowcast value and returned the current value instead. Once this goes to production I will likely lose that capability. |
Beta Was this translation helpful? Give feedback.
-
First off, I want to say a huge thank you to siku2 for developing this integration. I've been running it for several weeks now and it is rock solid and has allowed me to create automations based off of the data. If you have a Patreon, please let me know. I'd support the effort with code, but not really up to speed on coding these days.
Second, if people would like a conversion from the raw PM 2.5 data to the US AQI numbers, based on the same calculation that you see on your Davis WeatherLink page let me know. I implemented this through creating a sensor that returns the calculated AQI number. Since I modified my version to run off of the 1-minute PM value, this gives me the "real-time" AQI that I use to turn on/off window fans base on current outdoor air conditions.
While AQI is formally a backwards looking 24-hour calculation that is built on PM 2.5, PM10 and Ozone readings, that doesn't really help much if you want to run automations, thus the reliance on "real-time AQI". You'll find the real-time calculation on the Davis WeatherLink page and on Purple Air. Very useful in quickly changing conditions.
Beta Was this translation helpful? Give feedback.
All reactions