From ebda7dace0852b56b0aa02e6a909437c5bc352be Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 6 Nov 2025 14:46:11 -0600 Subject: [PATCH] not needed --- esphome/components/wifi/wifi_component.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/esphome/components/wifi/wifi_component.cpp b/esphome/components/wifi/wifi_component.cpp index 880b6960ea..12c2dda128 100644 --- a/esphome/components/wifi/wifi_component.cpp +++ b/esphome/components/wifi/wifi_component.cpp @@ -815,10 +815,13 @@ void WiFiComponent::retry_connect() { this->selected_sta_index_ = 0; // Retry from the first configured AP this->reset_for_next_ap_attempt_(); } else if (this->selected_sta_index_ >= static_cast(this->sta_.size()) - 1) { - // Exhausted all configured APs, cycle back to first + // Exhausted all configured APs, restart adapter and cycle back to first + // Restart clears any stuck WiFi driver state // Each AP is tried with SSID only (no BSSID/channel) which triggers ESP-IDF internal scanning + ESP_LOGW(TAG, "No more APs to try"); this->selected_sta_index_ = 0; this->reset_for_next_ap_attempt_(); + this->restart_adapter(); } else { // Try next AP this->selected_sta_index_++;