ESPHome does not connect to the strongest Wifi-AP

I’m using several Access Points to cover my house.
Unfortunately, ESPHome (esp8266) does not connect to the strongest AccessPoint, but more or less to a random one.

for example: wifi_info returns the following information:

mynetwork: -82dB 
mynetwork: -87dB 
mynetwork: -27dB 

And the esp8266 connects to a first (weak) network, instead of the strong one.
I found the following Issue Reconnect WiFi (scan for strongest AP) · Issue #731 · esphome/feature-requests · GitHub

Is there now a function built into esphome so that the Esp8266 selects the strongest AP?
Or is there an easy way?

Thanks

EDIT:
Even with the options " fast_connect: False" it does not work reliable.

If I have to switch off the Access Point while the esp8266 is running, the esp8266 never connects back to the strongest AP without a reboot.

1 Like

Have you checked the section “connect to multiple networks”?

You can give ESPHome a number of WiFi networks to connect to. ESPHome will then attempt to connect to the one with the highest signal strength.

You can also specify the MAC address of the station to connect to, so that you can manually pick the strongest one (assuming your device doesn’t move around):

bssid (Optional , string): The connection’s BSSID (MAC address). BSSIDs must consist of six two-digit hexadecimal values separated by colon characters (”: ”)

I know this is WAY old, but I ran across a similar problem. I had a need for temperature sensing about 100 meters down the road, and my home has 2 WiFi access points, one is the DHCP server in the basement, and the other is a pure access point on the second floor. The second floor one had the stronger signal at the ESP remote sensing location, but (apparently) because the ESP first connected to the basement router to get an IP, it hung onto that access point. This caused problems with the weaker signal. Programming the ESP with a static IP, then blocking LAN access to that IP on the basement device has worked wonders. Stronger signal, no more missing data!