Add USE_API for custom_api_device.h

This commit is contained in:
Hareesh M U 2023-11-04 11:43:50 +00:00
parent bdc6ae354f
commit 6f4fb305c8

View File

@ -1,11 +1,13 @@
#pragma once #pragma once
#include "esphome/components/api/custom_api_device.h"
#include <map>
#include <sstream>
#include <iomanip>
#include "esphome/core/defines.h" #include "esphome/core/defines.h"
#include "esphome/core/helpers.h"
#include "esphome/core/component.h" #include "esphome/core/component.h"
#include "esphome/core/preferences.h" #include "esphome/core/preferences.h"
#ifdef USE_BINARY_SENSOR #include "esphome/components/uart/uart.h"
#include "esphome/components/binary_sensor/binary_sensor.h"
#endif
#ifdef USE_SENSOR #ifdef USE_SENSOR
#include "esphome/components/sensor/sensor.h" #include "esphome/components/sensor/sensor.h"
#endif #endif
@ -21,14 +23,15 @@
#ifdef USE_SELECT #ifdef USE_SELECT
#include "esphome/components/select/select.h" #include "esphome/components/select/select.h"
#endif #endif
#ifdef USE_API
#include "esphome/components/api/custom_api_device.h"
#endif
#ifdef USE_TEXT_SENSOR #ifdef USE_TEXT_SENSOR
#include "esphome/components/text_sensor/text_sensor.h" #include "esphome/components/text_sensor/text_sensor.h"
#endif #endif
#include "esphome/components/uart/uart.h" #ifdef USE_BINARY_SENSOR
#include "esphome/core/helpers.h" #include "esphome/components/binary_sensor/binary_sensor.h"
#include <map> #endif
#include <sstream>
#include <iomanip>
#ifndef M_PI #ifndef M_PI
#define M_PI 3.14 #define M_PI 3.14