1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-19 08:15:49 +00:00

fix false positive logging

This commit is contained in:
J. Nick Koston
2025-11-06 13:58:39 -06:00
parent ef680933dc
commit 190668c25f

View File

@@ -730,8 +730,10 @@ void WiFiComponent::check_connecting_finished() {
} }
ESP_LOGI(TAG, "Connected"); ESP_LOGI(TAG, "Connected");
// We won't retry hidden networks unless a reconnect fails more than three times again // Warn if we had to retry with hidden network mode for a network that's not marked hidden
if (const WiFiAP *config = this->get_selected_sta_(); this->retry_hidden_ && config && !config->get_hidden()) { // Only warn if we actually connected without scan data (SSID only), not if scan succeeded on retry
if (const WiFiAP *config = this->get_selected_sta_();
this->retry_hidden_ && config && !config->get_hidden() && this->scan_result_.empty()) {
ESP_LOGW(TAG, "Network '%s' should be marked as hidden", config->get_ssid().c_str()); ESP_LOGW(TAG, "Network '%s' should be marked as hidden", config->get_ssid().c_str());
} }
this->retry_hidden_ = false; this->retry_hidden_ = false;