From 4c6a17e304002b741388335db30c06725a6730c6 Mon Sep 17 00:00:00 2001 From: Colm Date: Sat, 6 Jul 2024 08:02:41 +0100 Subject: [PATCH] Don't test for IPv6 addresses when min_ipv6_addr_count is 0 (#7037) --- esphome/components/wifi/wifi_component_esp_idf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/wifi/wifi_component_esp_idf.cpp b/esphome/components/wifi/wifi_component_esp_idf.cpp index c21486fee4..96fa837767 100644 --- a/esphome/components/wifi/wifi_component_esp_idf.cpp +++ b/esphome/components/wifi/wifi_component_esp_idf.cpp @@ -757,7 +757,7 @@ void WiFiComponent::wifi_process_event_(IDFWiFiEvent *data) { WiFiSTAConnectStatus WiFiComponent::wifi_sta_connect_status_() { if (s_sta_connected && this->got_ipv4_address_) { -#if USE_NETWORK_IPV6 +#if USE_NETWORK_IPV6 && (USE_NETWORK_MIN_IPV6_ADDR_COUNT > 0) if (this->num_ipv6_addresses_ >= USE_NETWORK_MIN_IPV6_ADDR_COUNT) { return WiFiSTAConnectStatus::CONNECTED; }