ESPHome Multiple Network config. What am I missing?

I’m trying to transition my wifi AP’s to different SSID’s. So I’m trying to make sure the ESPHome nodes can connect to the new one before I remove the old so I figured I’d set up the Sonoff to use multiple networks.

Per the docs the config is:

wifi:
  networks:
    - ssid: !secret wifi_ssid
      password: !secret wifi_pwd
    - ssid: !secret wifi_ssid_2
      password: !secret wifi_pwd

But for some reason it won’t connect to either SSID.

I have validated the config and it is valid.

If I remove the second SSID and reflash everything works fine.

So this works:

wifi:
  networks:
    - ssid: !secret wifi_ssid
      password: !secret wifi_pwd
    #- ssid: !secret wifi_ssid_2
    #  password: !secret wifi_pwd

Am I missing something?

@Tinkerer

thanks for fixing that. I knew I had seen an ESPHome tag before but I couldn’t remember where and couldn’t find it in my quick search.

How did you solve it? or am I missing something,…?

No, sorry. It’s not solved yet.

I was commenting on the fact that he changed the thread section & tags to “third party integrations” & " ESPHome".

Sorry for the confusion.

1 Like

I was having the same problem and it was that one of my SSIDs had spaces on the name and I didn’t have it in between quotes.

wifi:
  networks:
  - ssid: "MyFirstOption"
    password: "myfirstpassword"
  - ssid: "My Second Option"
    password: "myfirstpassword"
2 Likes

We have a winner! :slightly_smiling_face:

I haven’t tried it yet but that does exactly match my scenario so I can’t imagine that wouldn’t be it.

If it doesn’t work I’ll definitely let you know.

Thanks!

I have the same issue and no space in the SSID or in the password. Not even sure how to use the quotes if you use a secrets file for those data… I think there’s another explanation…

I had this where one of my passwords was only numbers; I put it in “1234” and now it passes validation.

I had the same issue, SSID had space but I did place it within quotes.
The only resolution was to change SSID not to have space.