code: def humidity(self):
          
          self._read_temperature()
          hum = self._read_register(_BME280_REGISTER_HUMIDDATA, 2)
          #print("Humidity data: ", hum)
          adc = float(hum[0] << 8 | hum[1])
          #print("adc:", adc)
  
          # Algorithm from the BME280 driver
          # https://github.com/BoschSensortec/BME280_driver/blob/master/bme280.c
          var1 = float(self._t_fine) - 76800.0
          #print("var1 ", var1)
          var2 = (self._humidity_calib[3] * 64.0 + (self._humidity_calib[4] / 16384.0) * var1)
          #print("var2 ",var2)
          var3 = adc - var2
          #print("var3 ",var3)
          var4 = self._humidity_calib[1] / 65536.0
          #print("var4 ",var4)
          var5 = (1.0 + (self._humidity_calib[2] / 67108864.0) * var1)
          #print("var5 ",var5)
          var6 = 1.0 + (self._humidity_calib[5] / 67108864.0) * var1 * var5
          #print("var6 ",var6)
          var6 = var3 * var4 * (var5 * var6)
          humidity = var6 * (1.0 - self._humidity_calib[0] * var6 / 524288.0)
  
          if humidity > _BME280_HUMIDITY_MAX:
              return _BME280_HUMIDITY_MAX
          if humidity < _BME280_HUMIDITY_MIN:
              return _BME280_HUMIDITY_MIN
          # else...
          return humidity
docs: The relative humidity in RH %
          returns None if humidity measurement is disabled