Multi-ssid in my esphome .yaml file: can't get it right

I’m in an iot-course, and we’ve started from basics using ESP32 and now I want to configure my ESP32, using the .yaml file. Someone in class showed me he got it working for several differend ssids’ in a single file. But I can’t make it work.
Executing “esphome run ~/config/huiswerk.yaml” always gives me errors. The last one was ‘expected a dictionary’

Source snippet:

The error msg. shows these lines with: ‘expected a dictionary’.

I suppose it’s a formatting problem, but I can’t figure it out. I’ve read the manual @ YAML Configuration in ESPHome - ESPHome - Smart Home Made Simple but that doen’t make it clear, either. I’m stuck.

See here.

You are missing networks:

wifi:
  networks:
  - ssid: "SNOW"
    password: "verystrongpassword"
  - ssid: "dd-wrt"
    password: "verystrongpassword"
  - ssid: "SNOW_EXT"
    password: "verystrongpassword"


  # Enable fallback hotspot in case wifi connection fails
  ap:
    ssid: "Bluetooth Fallback Hotspot"
    password: "verystrongpassword"
1 Like

Oh my …

Thank you, I’ll try that tomorrow.

Francis gave more info. Look at that too.

ap should be even with networks without a dash.

Thanks, it worked.
On to other problems