diff --git a/esphome/components/api/api_frame_helper.h b/esphome/components/api/api_frame_helper.h index 787e48914f..ae4ba0d90f 100644 --- a/esphome/components/api/api_frame_helper.h +++ b/esphome/components/api/api_frame_helper.h @@ -199,12 +199,4 @@ class APIFrameHelper { } // namespace api } // namespace esphome -// Include protocol-specific implementations -#ifdef USE_API_NOISE -#include "api_frame_helper_noise.h" -#endif -#ifdef USE_API_PLAINTEXT -#include "api_frame_helper_plaintext.h" -#endif - #endif // USE_API diff --git a/esphome/components/api/api_frame_helper_noise.h b/esphome/components/api/api_frame_helper_noise.h index 6a7b3a0a8a..ed5141d625 100644 --- a/esphome/components/api/api_frame_helper_noise.h +++ b/esphome/components/api/api_frame_helper_noise.h @@ -1,4 +1,5 @@ #pragma once +#include "api_frame_helper.h" #ifdef USE_API #ifdef USE_API_NOISE #include "noise/protocol.h" diff --git a/esphome/components/api/api_frame_helper_plaintext.h b/esphome/components/api/api_frame_helper_plaintext.h index de1cddc1e9..465ceae827 100644 --- a/esphome/components/api/api_frame_helper_plaintext.h +++ b/esphome/components/api/api_frame_helper_plaintext.h @@ -1,4 +1,5 @@ #pragma once +#include "api_frame_helper.h" #ifdef USE_API #ifdef USE_API_PLAINTEXT