INFO Reading configuration /config/esphome/esp-laundry-temp.yaml... Failed

INFO Reading configuration /config/esphome/esp-laundry-temp.yaml… Failed config

Here is the code:

esphome:
name: esp-laundry-temp

esp8266:
board: d1_mini

Enable logging

logger:

Enable Home Assistant API

api:

ota:
password: “311c7e10f49543bb391883be888e5236”

wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password

Enable fallback hotspot (captive portal) in case wifi connection fails

ap:
ssid: “Esp-Laundry-Temp”
password: “3HGYbjUDI9FG”

captive_portal:

web_server:
port: 80

Example configuration entry

sensor:

  • platform: dht
    pin: D2
    temperature:
    name: “Laundry Temperature”
    humidity:
    name: “Laundry Humidity”
    model: DHT11
    update_interval: 60s

I fixed it by changing the ota section to this:

ota:
platform: esphome
password: “311c7e10f49543bb391883be888e5236”

You need to post your code using code tags:
image
it’s not readable like that.