diff --git a/esphome/components/wifi/wifi_component.cpp b/esphome/components/wifi/wifi_component.cpp index 0e5a2022b3..002c11be5f 100644 --- a/esphome/components/wifi/wifi_component.cpp +++ b/esphome/components/wifi/wifi_component.cpp @@ -405,6 +405,9 @@ bool WiFiComponent::matches_configured_ssid_(const char *ssid) const { return false; } for (const auto &sta : this->sta_) { + // Skip hidden network configs (they don't appear in normal scans) + // For BSSID-only configs (empty SSID), match all networks since we can't filter by SSID + // Otherwise, match only the specific configured SSID if (!sta.get_hidden() && (sta.get_ssid().empty() || sta.get_ssid() == ssid)) { return true; }