Is BMP280 Barometric Pressure & Temp Sensor Compatible with Home Assistant (ESPHome)?
Electrical Specifications
Always confirm pin assignments against the manufacturer datasheet before wiring.
Compatibility Overview
Precision barometric pressure and temperature sensor for weather station forecasting and indoor altitude tracking.
Wiring BMP280 Barometric Pressure & Temp Sensor to ESP8266
| Module pin | ESP8266 | Note |
|---|---|---|
| VCC | 3V3 | The chip runs from 1.71 to 3.6V and its absolute maximum is 4.25V. Modules without a regulator must not see 5V. |
| GND | GND | |
| SCL | GPIO5 | D1 on a NodeMCU or Wemos D1 mini. |
| SDA | GPIO4 | D2. |
| CSB | 3V3 | Six-pin modules only. High selects I2C; see the gotchas for what a low level does. |
| SDO | GND | Selects 0x76, the address in the config. Tied to 3V3 it is 0x77. It must not float. |
Host pins are the ones the configuration on this page uses. Move a pin here and change it in the YAML — they are documented together so they cannot disagree.
Technical Specification Matrix
| Feature / Attribute | Specification / Status |
|---|---|
| Hardware Protocol | I2C Bus / 3.3V |
| Bridge Required | NO |
| Border Router Needed | None |
| Hardware Capabilities & Peripherals | Pressure (hPa) Temperature (°C) Note: these entities come from the ESPHome configuration you flash — each one needs its matching component in that YAML before it appears. |
| Pairing Complexity | Plug-and-Play |
| Factory Reset Instruction | Hold FLASH button during power-on. |
Wire, Flash, Adopt, Check
Wire it up
Follow the wiring table above. The ESP8266 pins there are the ones the configuration uses, so if you move one, change it in both places.
Flash the configuration
Create a new device in the ESPHome dashboard (the Home Assistant add-on) and paste the configuration below into it, or save it as emb_esp8266_bmp280_ha.yaml and run esphome run emb_esp8266_bmp280_ha.yaml. The first flash goes over USB. If it is not detected, hold FLASH button during power-on to put it in download mode. Every update after that is over the air.
Adopt it in Home Assistant
Settings → Devices & Services. A node on the same network shows up as a discovered ESPHome device within a minute of joining Wi-Fi; choose Configure and enter the API encryption key from your secrets.yaml. If discovery does not find it, add the ESPHome integration by hand with the node's IP address.
Check it works
The I2C scan at boot lists 0x76, Pressure lands a few hPa from your local station's figure once altitude is allowed for, and Temperature reads a degree or two above the room. A log saying "Wrong chip ID or no response" with a device present at 0x76 is usually a BME280 on the wrong platform. A device at 0x77 means SDO is high and the address line needs changing. Nothing on the bus at all is the wiring, or CSB having been pulled low — power-cycle the sensor.
ESPHome Configuration
Starting configuration for BMP280 Barometric Pressure & Temp Sensor on ESP8266. Untested on hardware — verify wiring and pins against your own board.
# ESPHome configuration for BMP280 Barometric Pressure & Temp Sensor
# Host: ESP8266. Pin numbers below are host-side defaults — any free
# GPIO will do, and you should change them to match your own wiring.
esphome:
name: emb_esp8266_bmp280_ha
friendly_name: "BMP280 Barometric Pressure & Temp Sensor"
esp8266:
board: nodemcuv2
logger:
api:
encryption:
key: !secret api_encryption_key
ota:
- platform: esphome
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
i2c:
id: i2c_main
sda: GPIO4
scl: GPIO5
scan: true
# SDO low = 0x76 (most breakouts), SDO high = 0x77.
sensor:
- platform: bmp280_i2c
address: 0x76
temperature:
name: "Temperature"
pressure:
name: "Pressure"
update_interval: 60s
Before you flash:
the !secret values come from your
secrets.yaml, and the GPIO numbers are host-side
defaults rather than properties of this part — change them to match how you actually wired it.
If the device is not found:
it is usually the I2C address, not the config. Many breakouts strap their address with
solder jumpers, so two boards of the same part can differ. This config leaves
scan: true on — the boot log lists every address
actually present on the bus, and you can copy the right one from there.
What Appears in Home Assistant
hPa, absolute, at the height of the sensor. ±1hPa between 0 and 65°C; see the gotchas before comparing it to a forecast.
°C from the chip's own sensor, which exists to compensate the pressure reading and typically reads above the room.
Not in the config. A template sensor combining Pressure with your altitude gives the sea-level figure forecasts quote; the same barometric formula run the other way estimates altitude against a reference pressure.
Known Problems and Fixes
BMP or BME
The BMP280 and the BME280 look almost identical on a breakout and are wired the same way, and boards sold as BME280 regularly carry a BMP280. The chip ID register settles it: 0x58 is a BMP280 and 0x60 a BME280. The bmp280_i2c and bme280_i2c platforms each check for their own ID and log "Wrong chip ID or no response" otherwise. A BMP280 has no humidity sensor, whatever the listing said.
Station pressure is not the forecast number
Pressure here is what the air weighs at the sensor. Weather services and forecasts quote pressure reduced to sea level. Near sea level the figure falls by roughly 1hPa for every 8 metres of height, so a node 100 metres up reads about 12hPa below the forecast and is not wrong. Correct it in a template sensor with your altitude, or compare trends rather than values.
The temperature reads warm
Bosch notes that the internal temperature sensor follows the PCB temperature and the sensor's own self-heating as well as the air, and usually reads above ambient. On a module plugged next to an ESP8266, the board's warmth adds to that. Mount the sensor on a few centimetres of wire away from the node, and use a dedicated temperature sensor if the room reading matters.
CSB picks the bus, once
The chip chooses I2C or SPI from CSB. If CSB is pulled low even once, I2C is disabled until the next power-on reset, so a probe touched to it or a GPIO that starts low leaves a sensor that ignores the bus. Tie CSB to 3.3V, and after a mistake remove power entirely rather than pressing reset.
ESPHome defaults to the other address
The platform assumes 0x77 unless told otherwise; the address: 0x76 line in the config is there because SDO is tied low. Delete it on a 0x76 board and the component fails at setup with the bus scan still showing the sensor. SDO left floating gives an undefined address.
What ±1hPa buys
Absolute accuracy is ±1hPa, so two sensors can disagree by 2hPa out of the box; an offset filter against a nearby official station fixes that. Relative accuracy is much tighter, ±0.12hPa or about a metre of height, which is why the trend over a few hours is more useful than any single value.
Shares I²C address 0x76
These parts default to the same address. At least one can be re-strapped, so they can coexist once you change it:
- BME680 Environmental & Gas Sensor — resolvable
- BME280 Temp Humidity & Pressure Sensor — resolvable
SDO pin selects 0x76 or 0x77 — the BME280/BME680 strap. Check a full build in the planner · The ways out of an address conflict
Report a Pinout Error or Submit Tested Code Snippets
Found a pin mapping quirk or built a custom ESPHome YAML driver for BMP280 Barometric Pressure & Temp Sensor? Submit a pull request or report corrections to our index.
Hardware Correction Reporter (emb-esp8266-bmp280-ha)
Frequently Asked Questions
Does BMP280 Barometric Pressure & Temp Sensor work without an internet connection?
How is BMP280 Barometric Pressure & Temp Sensor powered and wired to the host board?
How does the host board reach Home Assistant (ESPHome)?
Alternatives
BME280 Temp Humidity & Pressure Sensor
The same package and wiring with humidity added — the genuine version of what many BMP280 boards are sold as.
AHT20 Humidity & Temperature Sensor
Adds humidity and a better air temperature on the same two ESP8266 pins, with the BMP280 left for pressure.
Bosch BMP390 Precision Barometer Sensor
Bosch's newer barometer on bmp3xx_i2c, with tighter relative accuracy for floor-level changes.
DPS310 Precision Barometric Sensor
Infineon's high-precision barometer, another route to detecting small height changes.
BME680 Environmental & Gas Sensor
Pressure, temperature and humidity plus a gas resistance reading for indoor air quality.