1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-16 14:55:50 +00:00
This commit is contained in:
J. Nick Koston
2025-11-06 11:46:59 -06:00
parent bfca9cb6c2
commit 03fd2eef2f

View File

@@ -751,16 +751,17 @@ void WiFiComponent::check_connecting_finished() {
this->state_ = WIFI_COMPONENT_STATE_STA_CONNECTED;
this->num_retried_ = 0;
#ifdef USE_WIFI_FAST_CONNECT
this->save_fast_connect_settings_();
#endif
// Free scan results memory unless a component needs them
if (!this->keep_scan_results_) {
this->scan_result_.clear();
this->scan_result_.shrink_to_fit();
this->selected_scan_index_ = -1; // Invalidate index since scan results are gone
}
#ifdef USE_WIFI_FAST_CONNECT
this->save_fast_connect_settings_();
#endif
return;
}