-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Add AQI rating template sensor example to the PurpleAir docs #25687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AQI rating template sensor example to the PurpleAir docs #25687
Conversation
Not sure why CI is failing. |
This is great. Thanks for adding the example to get the AQI levels. Could you also add an example to calculate the AQI (as a number) from the PM2.5? I think the documentation is at https://www.airnow.gov/sites/default/files/2020-05/aqi-technical-assistance-document-sept2018.pdf and there are some corrections needed. https://gitlab.com/gibwar/home-assistant-purpleair/-/tree/main/ has the calculations built in. |
Those calculations are quite complicated for a template sensor. Doesn't mean it can't be done, but I would recommend that being a separate docs PR. |
FWIW as a user I would really love the actual corrected AQI number. The general "good/moderate/bad" rating is not particularly helpful. |
I'm not sure I agree with that sentiment (especially since values like "Good" are already directly correlated with an AQI range). Nevertheless, the example in this PR can be adopted as a framework for producing an AQI value instead (as long as the math is changed). |
9adebf6
to
7c1748d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @bachya 👍
../Frenck
Proposed change
Many people ask why the PurpleAir integration doesn't have an AQI sensor (the API doesn't provide that data). I've been sharing an example to create one via a template sensor; this PR includes it in the official docs.
Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
Checklist
current
branch.next
branch.