From 6f4fb305c8010ec26689bfa571eff43f339ec6c0 Mon Sep 17 00:00:00 2001 From: Hareesh M U Date: Sat, 4 Nov 2023 11:43:50 +0000 Subject: [PATCH] Add USE_API for custom_api_device.h --- esphome/components/ld2450/ld2450.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/esphome/components/ld2450/ld2450.h b/esphome/components/ld2450/ld2450.h index c909eb543b..d3c30e9d07 100644 --- a/esphome/components/ld2450/ld2450.h +++ b/esphome/components/ld2450/ld2450.h @@ -1,11 +1,13 @@ #pragma once -#include "esphome/components/api/custom_api_device.h" + +#include +#include +#include #include "esphome/core/defines.h" +#include "esphome/core/helpers.h" #include "esphome/core/component.h" #include "esphome/core/preferences.h" -#ifdef USE_BINARY_SENSOR -#include "esphome/components/binary_sensor/binary_sensor.h" -#endif +#include "esphome/components/uart/uart.h" #ifdef USE_SENSOR #include "esphome/components/sensor/sensor.h" #endif @@ -21,14 +23,15 @@ #ifdef USE_SELECT #include "esphome/components/select/select.h" #endif +#ifdef USE_API +#include "esphome/components/api/custom_api_device.h" +#endif #ifdef USE_TEXT_SENSOR #include "esphome/components/text_sensor/text_sensor.h" #endif -#include "esphome/components/uart/uart.h" -#include "esphome/core/helpers.h" -#include -#include -#include +#ifdef USE_BINARY_SENSOR +#include "esphome/components/binary_sensor/binary_sensor.h" +#endif #ifndef M_PI #define M_PI 3.14