1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-17 23:35:47 +00:00
This commit is contained in:
J. Nick Koston
2025-11-06 11:57:23 -06:00
parent 083f41c43f
commit 2c110a9e7e

View File

@@ -683,15 +683,15 @@ void WiFiComponent::check_scanning_finished() {
log_scan_result(res);
}
if (!this->scan_result_[0].get_matches()) {
// Find matching config for on-demand connection params building
const WiFiScanResult &scan_res = this->scan_result_[0];
if (!scan_res.get_matches()) {
ESP_LOGW(TAG, "No matching network found");
this->retry_connect();
return;
}
// Find matching config for on-demand connection params building
const WiFiScanResult &scan_res = this->scan_result_[0];
for (size_t i = 0; i < this->sta_.size(); i++) {
// search for matching STA config, at least one will match (from checks before)
if (!scan_res.matches(this->sta_[i])) {