diff --git a/esphome/components/api/entity_iterator_macros.h b/esphome/components/api/entity_iterator_macros.h deleted file mode 100644 index 7d988c1773..0000000000 --- a/esphome/components/api/entity_iterator_macros.h +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once - -#include "esphome/core/defines.h" -#ifdef USE_API - -namespace esphome { -namespace api { - -// Macro-based approach to eliminate duplication without runtime overhead -// This generates the entity handler methods at compile time - -// For ListEntitiesIterator - calls schedule_message_ with try_send_*_info -#define LIST_ENTITIES_HANDLER(entity_type, EntityClass, ResponseType) \ - bool ListEntitiesIterator::on_##entity_type(EntityClass *entity) { \ - return this->client_->schedule_message_(entity, &APIConnection::try_send_##entity_type##_info, \ - ResponseType::MESSAGE_TYPE); \ - } - -// For InitialStateIterator - calls send_*_state -#define INITIAL_STATE_HANDLER(entity_type, EntityClass) \ - bool InitialStateIterator::on_##entity_type(EntityClass *entity) { \ - return this->client_->send_##entity_type##_state(entity); \ - } - -} // namespace api -} // namespace esphome - -#endif // USE_API \ No newline at end of file