Skip to content

Instantly share code, notes, and snippets.

@peyanski
Last active February 29, 2024 20:50
Show Gist options
  • Save peyanski/cec1e7d1c08d52ffeceda792f2a72422 to your computer and use it in GitHub Desktop.
Save peyanski/cec1e7d1c08d52ffeceda792f2a72422 to your computer and use it in GitHub Desktop.
esphome:
name: temperature-sensor-bme280
esp8266:
board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Temperature-Sensor-Bme280"
password: "E19mmSDVlWnt"
captive_portal:
i2c:
sda: 4
scl: 5
scan: True
# Example configuration entry
sensor:
- platform: bme280
temperature:
name: "BME280 Temperature"
oversampling: 16x
pressure:
name: "BME280 Pressure"
humidity:
name: "BME280 Humidity"
address: 0x77
update_interval: 60s
web_server:
port: 80
@NEight8
Copy link

NEight8 commented Feb 29, 2024

There was a breaking change to the ESPHome platform for the bme280 sensors recently, and the platform line needs to have _i2c added to the end or you will get the following errors:

INFO ESPHome 2024.2.1
INFO Reading configuration /config/esphome/esphome-web-c3c983.yaml...
Failed config
sensor.bme280: [source /config/esphome/esphome-web-c3c983.yaml:37]
Platform not found: 'sensor.bme280'.
platform: bme280

Change needed:

sensor:
OLD: - platform: bme280
NEW: - platform: bme280_i2c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment