diff --git a/esphome/components/wifi/wifi_component.cpp b/esphome/components/wifi/wifi_component.cpp index 38d4fc44b5..8812f1becf 100644 --- a/esphome/components/wifi/wifi_component.cpp +++ b/esphome/components/wifi/wifi_component.cpp @@ -382,15 +382,11 @@ WiFiAP WiFiComponent::build_selected_ap_() const { // Therefore scan_result_[0] is guaranteed to match sta_[selected_sta_index_] if (!this->scan_result_.empty()) { const WiFiScanResult &scan = this->scan_result_[0]; - - if (!params.get_hidden()) { - // Selected network is visible, override with data from the scan. - // Limit the connect params to only connect to exactly this network - // (network selection is done during scan phase). - params.set_ssid(scan.get_ssid()); - params.set_bssid(scan.get_bssid()); - params.set_channel(scan.get_channel()); - } + // If we have scan data, the network is visible (not hidden) - use it regardless of config + // Hidden networks don't appear in scan results, so presence of scan data is ground truth + params.set_ssid(scan.get_ssid()); + params.set_bssid(scan.get_bssid()); + params.set_channel(scan.get_channel()); } return params;