[I][i2c.arduino:054]: Results from i2c bus scan:
[I][i2c.arduino:056]: Found no i2c devices!
[C][bme280.sensor:143]: BME280:
[C][bme280.sensor:144]: Address: 0x76
[E][bme280.sensor:147]: Communication with BME280 failed!
Sorry, next to impossible to type this on phone. Looks like you have commented out sda and scl.
Also don’t think you need the line
i2c_id: bus_a in the sensor section.
Hopefully, this will help you. One way that I test my BMP280 is that I keep it simple, at the start, and only test the temperature section. I also like to use relays in order to test some output pins. You can easily come back and add the pressure sensor. I learned many years ago to keep my variable’s to a minimum… and that was “before” computer programming variables came along.
esphome:
name: wemos-test
esp8266:
board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "test"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "wemos-test"
password: "test"
captive_portal:
i2c:
sda: D2 # GPIO4 - Pin numbers aren't always required but I use them.
scl: D1 # GPIO5
scan: False # Removing another variable. The scan feature.
sensor:
- platform: bmp280
temperature:
name: "Heat-Sensor"
address: 0x76 # possibly 0x77. I don't depend on scan.
# Test the above code first and then add this lower section if you want to test some output pins.
switch:
- platform: gpio
pin: D6
name: "RelayD6"
id: RelayD6
- platform: gpio
pin: D7
name: "RelayD7"
id: RelayD7
- platform: template
name: "Heat Mode"
id: Heat_Mode
turn_on_action:
- then:
- switch.turn_on: RelayD6
- switch.turn_on: RelayD7
- switch.template.publish:
id: Heat_Mode
state: ON
turn_off_action:
- then:
- switch.turn_off: RelayD6
- switch.turn_off: RelayD7
- switch.template.publish:
id: Heat_Mode
state: OFF
Here is some more useful information for anyone starting out with the BMP280 and D1 Mini.