Error when installing yaml file

I have a BMP280 sensor which has been working for a couple of years now. I recently changed my isp so I then had to use new wifi details. After I did that I saved the yaml file and then tried to install it.
I am getting errors regarding the BMP280 sensor

This is part of the said file:

NFO ESPHome 2024.5.5
INFO Reading configuration /config/esphome/home.yaml…
Failed config

sensor.bmp280: [source /config/esphome/home.yaml:24]
platform: bmp280
temperature:
name: BMP280 Temperature
oversampling: 16x
pressure:
name: BMP280 Pressure

[humidity] is an invalid option for [sensor.bmp280]. Please check the indentation.
humidity:
name: BMP280 Humidity
address: 118
update_interval: 60s

Looks to be an indentation problem.

Please post the whole config and format the code as shown here:

Paste the entire config, properly formatted with the </> button.

esphome:
  name: home

esp32:
  board: esp32dev
  framework:
    type: arduino

web_server:
  port: 80 

i2c:
  - id: i2c_bus
    sda: 21
    scl: 22
    scan: false

sensor:
  - platform: bh1750
    name: "BH1750 Illuminance"
    address: 0x23
    update_interval: 60s
    
  - platform: bmp280
    temperature:
      name: "BMP280 Temperature"
      oversampling: 16x
    pressure:
      name: "BMP280 Pressure"
    humidity:
      name: "BMP280 Humidity"
    address: 0x76
    update_interval: 60s         

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "5eG1J6S9xiTpfLD8ISXtA6rr3/aqUInG/u24PCW71xo="

ota:
  password: "3439daf13cd28f06540765183d5937a8"

wifi:
  ssid: *********

  password: wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Home Fallback Hotspot"
    password: "3DXhiw7F5Jar"

captive_portal:
    type or paste code here

If I look up the BMP280 in esphome, it does not support humidity, like the error says. Are you sure that ever worked? The BME does, the BMP does not. So if it is a BMP, remove the humidity but, if it is a BME, then change the platform for the sensor.

1 Like

I have had the BMP280 in use for almost 2 years and the yaml file uploaded without error
I don’t know why it won’t work or upload now.

thanks

Update:
After removing the BMP280 Humidity lines, I tried to install the file again but after a minute of ‘preparing to download’ I get this:

Install ESPHome via the browser

ESPHome can install home.yaml on your device via the browser
if certain requirements are met:

ESPHome is visited over HTTPS
Your browser supports WebSerial

Not all requirements are currently met. The easiest solution is to download your project and do the installation with ESPHome Web. ESPHome Web works 100% in your browser and no data will be shared with the ESPHome project.

So what doe all that mean, Is it saying that the yaml file cannot be downloaded by the ‘Install’ from the file

I managed to get the yaml file installed to my esp device, but now in ESPhome none of the sensors, ie temperature and pressure are available. It says Entity not available.

What can I do now.