BME280 Temperature+Pressure+Humidity Sensor
The bme280 sensor platform allows you to use your BME280
(datasheet,
Adafruit_) temperature, pressure and humidity sensors with ESPHome. The sensor
is used in Forced Mode where measurement is performed and then
the sensor returns to sleep mode until next measurement. The I²C or SPI is
required to be set up in your configuration for this sensor to work.
Note: In I²C mode pulling CSB to 3V is recommended, in order to avoid [E][sensor.bme280:155]: Communication with BME280 failed! error. See the Connection diagram chapter in datasheet above.

# Example configuration entry I2C
sensor:
  - platform: bme280_i2c
    temperature:
      name: "BME280 Temperature"
    pressure:
      name: "BME280 Pressure"
    humidity:
      name: "BME280 Humidity"
# Example configuration entry SPI
sensor:
  - platform: bme280_spi
    temperature:
      name: "BME280 Temperature"
    pressure:
      name: "BME280 Pressure"
    humidity:
      name: "BME280 Humidity"
    cs_pin: GPIOXXConfiguration variables
temperature (Optional): The information for the temperature sensor.
oversampling (Optional): The oversampling parameter for the temperature sensor. See Oversampling Options.
All other options from Sensor.
pressure (Optional): The information for the pressure sensor.
oversampling (Optional): The oversampling parameter for the pressure sensor. See Oversampling Options.
All other options from Sensor.
humidity (Optional): The information for the humidity sensor.
oversampling (Optional): The oversampling parameter for the humidity sensor. See Oversampling Options.
All other options from Sensor.
iir_filter (Optional): Set up an Infinite Impulse Response filter to increase accuracy. One of
OFF,2x,4x,16x. Defaults toOFF.update_interval (Optional, Time): The interval to check the sensor. Defaults to
60s.
I²C Configuration variables:
- address (Optional, int): Manually specify the I²C address of
the sensor. Defaults to 
0x77. Another address can be0x76. 
SPI Configuration variables:
- cs_pin (Optional, Pin Schema): The CS pin of the BME280 sensor.
 
Oversampling Options
By default, the BME280 sensor measures each value 16 times when requesting a new value. You can, however, configure this amount. Possible oversampling values:
NONE(value is skipped)1x2x4x8x16x(default)