Install code on ESP32

Hi!
I want to install something on my esp32 but it dosn’t work.
Maybe someone finds an error…

This is the error:

INFO ESPHome 2025.4.1
INFO Reading configuration /config/esphome/esphome-web-6912f8.yaml...
Failed config

ota.unknown: [source /config/esphome/esphome-web-6912f8.yaml:21]
  
  'ota' requires a 'platform' key but it was not specified.
  platfrom: esp32
  password: programmieren123!

And this the code

esphome:
  name: esphome-web-6912f8
  friendly_name: Bewaesserung_1
  min_version: 2024.11.0
  name_add_mac_suffix: false

esp32:
  board: esp32dev
  framework:
    type: esp-idf

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "34f61ac3ff908fad4c26acbbce7d30e5"

ota:
  platfrom: esp32
  password: "programmieren123!"  # Passwort für OTA-Updates

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

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

captive_portal:

# Define time component
time:
  - platform: homeassistant
    id: homeassistant_time

# Define switches (Relays)
switch:
  - platform: gpio
    name: "Relay 1"
    pin: D2
    restore_mode: ALWAYS_OFF
    id: rasen_sprinkler_eingangsbereich
    on_turn_on:
      - delay: 20min
      - switch.turn_off: rasen_sprinkler_eingangsbereich
  - platform: gpio
    name: "Relay 2"
    pin: D4
    restore_mode: ALWAYS_OFF
    id: rasen_sprinkler_hinten_rechts
    on_turn_on:
      - delay: 30min
      - switch.turn_off: rasen_sprinkler_hinten_rechts
  - platform: gpio
    name: "Relay 3"
    pin: D16
    restore_mode: ALWAYS_OFF
    id: rasen_sprinkler_hinten_links
    on_turn_on:
      - delay: 30min
      - switch.turn_off: rasen_sprinkler_hinten_links
  - platform: gpio
    name: "Relay 4"
    pin: D17
    restore_mode: ALWAYS_OFF
    id: gemuese_sprinkler_hochbeet
    on_turn_on:
      - delay: 20min
      - switch.turn_off: gemuese_sprinkler_hochbeet
  - platform: gpio
    name: "Relay 5"
    pin: D5
    restore_mode: ALWAYS_OFF
    id: thujen_tropfschlauch
    on_turn_on:
      - delay: 40min
      - switch.turn_off: thujen_tropfschlauch
  - platform: gpio
    name: "Relay 6"
    pin: D18
    restore_mode: ALWAYS_OFF
    id: weg_tropfschlauch
    on_turn_on:
      - delay: 40min
      - switch.turn_off: weg_tropfschlauch

# Define weekly schedule for valves (optimized with OR conditions)
interval:
  - interval: 1s
    then:
      - if:
          condition:
            and:
              conditions:
                - time.weekday: MONDAY
                - time.weekday: WEDNESDAY
                - time.weekday: SATURDAY
                - time.hour == 4
                - time.minute == 00
          then:
            - switch.turn_on: rasen_sprinkler_eingangsbereich
      - if:
          condition:
            and:
              conditions:
                - time.weekday: MONDAY
                - time.weekday: WEDNESDAY
                - time.weekday: SATURDAY
                - time.hour == 4
                - time.minute == 30
          then:
            - switch.turn_on: rasen_sprinkler_hinten_rechts
      - if:
          condition:
            and:
              conditions:
                - time.weekday: MONDAY
                - time.weekday: WEDNESDAY
                - time.weekday: SATURDAY
                - time.hour == 5
                - time.minute == 00
          then:
            - switch.turn_on: rasen_sprinkler_hinten_links
      - if:
          condition:
            and:
              conditions:
                - time.weekday: MONDAY
                - time.weekday: WEDNESDAY
                - time.weekday: SATURDAY
                - time.hour == 5
                - time.minute == 30
          then:
            - switch.turn_on: gemuese_sprinkler_hochbeet
      - if:
          condition:
            and:
              conditions:
                - time.weekday: MONDAY
                - time.weekday: WEDNESDAY
                - time.weekday: SATURDAY
                - time.hour == 6
                - time.minute == 00
          then:
            - switch.turn_on: thujen_tropfschlauch
      - if:
          condition:
            and:
              conditions:
                - time.weekday: MONDAY
                - time.weekday: WEDNESDAY
                - time.weekday: SATURDAY
                - time.hour == 6
                - time.minute == 30
          then:
            - switch.turn_on: weg_tropfschlauch
ota:
  platfrom: esphome
  password: "programmieren123!"  # Passwort für OTA-Updates

Also: platfORm, not platfROm!!!

3 Likes

Hi!
This is my new problem…
How do I solve it?

Same error…

Don’t post screenshots- most of us won’t open it. And when you post YAML configuration files, use code tags because the forum editor screws up formatting.
How to help us help you - or How to ask a good question - Configuration - Home Assistant Community

On your error- Encryption key is optional, and I don’t think that = is an acceptable character.

It can’t be same error… that one was because you misspelled command…

Did you use the key in the bottom of your screenshot?

You can not just invent your own key unless you understand what Base64 is.