Open kevin1 opened 2 years ago
Oooh weird! Thanks for the report. It still works for me, so seems that some sensors don't return this. We should definitely fail a bit more gracefully!
@skalnik just for my own education, is it possible to do this calculation without humidity? Iām wondering what a good solution would be.
It looks like the humidity is needed for the calculation using the EPA recommended corrections. But the AQandU function is still in the codebase. Perhaps the best option would be if the sensor doesn't return the humidity, use the AQandU calculation instead (and note that when displaying the results).
I think that's reasonable! Another idea would be cutting down the list of sensors just to those that have humidity?
Hi,
I noticed that aqi.wtf has been showing
-
for the AQI recently:It is because the sensors are no longer returning the humidity:
https://github.com/skalnik/aqi-wtf/blob/03e5090f8af3d6bf7aea47cd27e9d089103a877f/app.js#L93
Console output:
the undefined humidity causes aqiFromPM to return a hyphen instead of the AQI calculation.