From 7d4b3ff3a6ad5c731d9978b9fbffb12d83c53eef Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 6 Nov 2025 11:36:52 -0600 Subject: [PATCH] preen --- esphome/components/wifi/wifi_component.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/esphome/components/wifi/wifi_component.cpp b/esphome/components/wifi/wifi_component.cpp index 7fe683ef0e..d2a44ce8da 100644 --- a/esphome/components/wifi/wifi_component.cpp +++ b/esphome/components/wifi/wifi_component.cpp @@ -728,10 +728,8 @@ void WiFiComponent::check_connecting_finished() { ESP_LOGI(TAG, "Connected"); // We won't retry hidden networks unless a reconnect fails more than three times again - if (this->retry_hidden_) { - if (const WiFiAP *config = this->get_selected_sta_(); config && !config->get_hidden()) { - ESP_LOGW(TAG, "Network '%s' should be marked as hidden", config->get_ssid().c_str()); - } + if (const WiFiAP *config = this->get_selected_sta_(); this->retry_hidden_ && config && !config->get_hidden()) { + ESP_LOGW(TAG, "Network '%s' should be marked as hidden", config->get_ssid().c_str()); } this->retry_hidden_ = false;