diff --git a/components/tc_bus/tc_bus.cpp b/components/tc_bus/tc_bus.cpp index 4a6a034..d690e8a 100644 --- a/components/tc_bus/tc_bus.cpp +++ b/components/tc_bus/tc_bus.cpp @@ -1,7 +1,6 @@ #include "protocol.h" #include "tc_bus.h" -#include "esphome.h" #include "esphome/core/application.h" #include "esphome/core/defines.h" #include "esphome/core/log.h" diff --git a/components/tc_bus/tc_bus.h b/components/tc_bus/tc_bus.h index 84995ba..2b2d024 100644 --- a/components/tc_bus/tc_bus.h +++ b/components/tc_bus/tc_bus.h @@ -2,7 +2,6 @@ #include "protocol.h" -#include "esphome.h" #include "esphome/core/application.h" #include "esphome/core/defines.h" #include "esphome/core/log.h" @@ -31,6 +30,7 @@ #include "esphome/components/number/number.h" #endif + namespace esphome { namespace tc_bus @@ -80,7 +80,11 @@ namespace esphome uint32_t serial_number; }; + #ifdef USE_API + class TCBusComponent : public Component, public remote_base::RemoteReceiverListener, public esphome::api::CustomAPIDevice + #else class TCBusComponent : public Component, public remote_base::RemoteReceiverListener + #endif { #ifdef USE_TEXT_SENSOR SUB_TEXT_SENSOR(bus_command)