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

Zero values #23

Closed xslima00 closed 2 years ago

xslima00 commented 2 years ago
            loginf("channel A for %s is missing data" % key)
            record[key] = valB
        elif valB == 0.0 and valA != 0.0:
            loginf("channel B for %s is missing data" % key)
            record[key] = valA
        else:
            if abs((valA / valB) - 1) > 0.2:
                logerr("sensor error %s disagree. %f vs %f " % (key, valA, valB))
            record[key] = (valA + valB) / 2.0

I´d like to ask for situations when there is no pollution. Is it even possible? During sunny and windy day I saw amount of particles decrease to 0.0X and then for 1h nothing was reported. From code above I see it´s not acceptable to have zero records. Is it OK?

xslima00 commented 2 years ago

fixed with version 0.7