From 78258dc5540ab8c9384ae35dce4311af56c32b50 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 19 Aug 2026 14:30:46 -0500 Subject: [PATCH] [wifi] Declare the AP portal helpers for builds without an access point --- esphome/components/wifi/wifi_component.cpp | 2 -- esphome/components/wifi/wifi_component.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/esphome/components/wifi/wifi_component.cpp b/esphome/components/wifi/wifi_component.cpp index 4f523167e0..38268bdf60 100644 --- a/esphome/components/wifi/wifi_component.cpp +++ b/esphome/components/wifi/wifi_component.cpp @@ -2219,7 +2219,6 @@ bool WiFiComponent::is_ap_portal_active_() { return this->is_captive_portal_active_(); } -#ifdef USE_WIFI_AP void WiFiComponent::start_ap_portal_() { #ifdef USE_CAPTIVE_PORTAL if (captive_portal::global_captive_portal != nullptr) @@ -2239,7 +2238,6 @@ void WiFiComponent::end_ap_portal_() { web_server::global_web_server->end_captive(); #endif } -#endif // USE_WIFI_AP bool WiFiComponent::is_esp32_improv_active_() { #ifdef USE_IMPROV return esp32_improv::global_improv_component != nullptr && esp32_improv::global_improv_component->is_active(); diff --git a/esphome/components/wifi/wifi_component.h b/esphome/components/wifi/wifi_component.h index cea53f2136..a7adce1a0d 100644 --- a/esphome/components/wifi/wifi_component.h +++ b/esphome/components/wifi/wifi_component.h @@ -791,10 +791,8 @@ class WiFiComponent final : public Component { bool is_captive_portal_active_(); /// captive_portal or the web_server AP mode is serving a user on the access point bool is_ap_portal_active_(); -#ifdef USE_WIFI_AP void start_ap_portal_(); void end_ap_portal_(); -#endif bool is_esp32_improv_active_(); #ifdef USE_WIFI_FAST_CONNECT