Skip to content

offset variables have mixed and unconventional signs #140

Open

Description

@gdt

I have recently tried to calibrate a number of sensors, and used the AIR-1 offset entity concept in some home-assembled ESP8288 sensors (Si7021, BME280). I have also been looking at the calibration instructions for Davis weather stations.

I found:

  • Davis: corrected = raw + offset
  • AIR-1 Temperature and Humidity: corrected = raw - offset
  • AIR-1 Pressure: corrected = raw + offset

Offsets to variables should have a consistent sign/formula. Calling something an offset is fine, and I expected it to be added. I treat Davis's approach as having more weight and longstanding history in the broader community.

Therefore, I think the AIR-1 code should be changed to to be corrected = raw + offset.

Probably there is some cool esphome trick to flip the sign of the variable on first boot with new code, with an aux variable that's persisted, and that can be gc'd after a year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions