bakerkj / weewx-purpleair

WeeWx Extension to pull data from the local interface of a Purple Air air quality sensor
GNU General Public License v2.0
17 stars 11 forks source link

Gracefully handle missing weather fields (temperature, humidity, pressure) #5

Closed ke6jjj closed 5 years ago

ke6jjj commented 5 years ago

PurpleAir sensor reports occasionally miss temperature, humidity and pressure items yet still continue to report air quality measurements. It is important to capture the air quality measurements even if the other measurements are missing. This patch makes it possible to do so. Without it, the collection task will throw an exception and fail to log any data.

If these fields are missing, they will now be logged at INFO level, with a message similar to the following:

purpleair: sensor didn't report field(s): temperature,humidity,pressure