diff --git a/esphome/components/wifi/wifi_component.cpp b/esphome/components/wifi/wifi_component.cpp index dcb81a80a02..f8a3728288d 100644 --- a/esphome/components/wifi/wifi_component.cpp +++ b/esphome/components/wifi/wifi_component.cpp @@ -618,9 +618,6 @@ void WiFiComponent::set_sta(const WiFiAP &ap) { this->init_sta(1); this->add_sta(ap); this->selected_sta_index_ = 0; - // Force scan on next attempt even if captive portal is still active - // This ensures new credentials are tried with proper BSSID selection after provisioning - this->force_scan_after_provision_ = true; } WiFiAP WiFiComponent::build_params_for_current_phase_() { @@ -683,10 +680,6 @@ void WiFiComponent::save_wifi_sta(const std::string &ssid, const std::string &pa sta.set_password(password); this->set_sta(sta); - // Force scan on next attempt even if captive portal is still active - // This ensures new credentials are tried with proper BSSID selection after provisioning - this->force_scan_after_provision_ = true; - // Trigger connection attempt (exits cooldown if needed, no-op if already connecting/connected) this->connect_soon_(); } diff --git a/esphome/components/wifi/wifi_component.h b/esphome/components/wifi/wifi_component.h index 5e58c41bc0c..ff438b29271 100644 --- a/esphome/components/wifi/wifi_component.h +++ b/esphome/components/wifi/wifi_component.h @@ -532,7 +532,6 @@ class WiFiComponent : public Component { bool enable_on_boot_; bool got_ipv4_address_{false}; bool keep_scan_results_{false}; - bool force_scan_after_provision_{false}; bool did_scan_this_cycle_{false}; bool skip_cooldown_next_cycle_{false};