I’m using ESPHome for years and loving it. Have for about 15 devices in my home. Latest development is using them outside. Most of the time ESP32 with several sensors connected. My latest is a motion detection (HC-RS501) for garden lights. In my experiance with that sensor low power Wifi is neccesary and using my non 5ghz Wifi setup. I’m using a setup with two possible SSID’s. But i have 4 different SSID’s in my environment.
# Your Wi-Fi SSID and password
1_wifi_ssid: "wwwmdfotonlmesh"
1_wifi_password: "xxxxxx"
2_wifi_ssid: "wwwmdfotonl"
2_wifi_password: "xxxxxx"
3_wifi_ssid: "wwwmdfotonliot"
3_wifi_password: "xxxxxx"
So i’m trying to connect to a specific wifi network 2_wifi / 3_wifi using secrets.
But…
The device is connecting to all possible wifi ap’s listed in the secret.yaml file as shown here:
[07:23:39][C][wifi:504]: WiFi:
[07:23:39][C][wifi:362]: Local MAC: xx:B8:15:C1:xx:xx
[07:23:39][C][wifi:363]: SSID: **[wwwmdfotonlmesh]**
[07:23:39][C][wifi:364]: IP Address: 192.168.254.115
[07:23:39][C][wifi:366]: BSSID: [redacted]
[07:23:39][C][wifi:367]: Hostname: 'bewbuiten1'
Didn’t i understand the way this should be working? Or did i make a config fault?
But your secrets.yaml has a problem. (Note, I am YAML-challenged and not an expert).
The secrets file is a list of substitutions using the format: key: "data"
and you are using the same keywords more than once. I don’t think it will throw an error, but only the first key will be used.
sorry for asking, but it’s not 100% clear for me:
Is the statement “…that we Can’t use SECRET in multiple networks?..” correct or is it possible to use also secret.yaml with multiple wifi-networks, so more than one SSID + PW in secrets.yaml?