adafruit / Adafruit_CircuitPython_BME280

CircuitPython driver for the BME280
MIT License
63 stars 42 forks source link

Add relative_humidity property #40

Closed anecdata closed 3 years ago

anecdata commented 3 years ago

Almost all Adafruit libraries with a humidity sensor use relative_humidity as the name of the property for sensor humidity: SHT31D, Si7021, HTU21D, AM2320, HTS221, AHTx0

This PR adds a relative_humidity property to BME280 (which simply accesses the humidity property) to normalize the API and allow users to remove conditional processing in environments where different humidity sensors may be used.

This has been tested on a BME280 connected to a Feather M4 running CP 5.3.1 and the library's simpletest.py code.