How does BME280 measure air humidity?
Typically low cost RH sensors use capacitance measurement with a hygroscopic polymer layer. 

See, for example, O’Dowd, J., Callanan, A., &amp; Banarie, G. (n.d.). Capacitive Sensor Interfacing Using Sigma-Delta Techniques. IEEE Sensors, 2005. doi:10.1109/icsens.2005.1597858