From fca9befa6354feeddd13225305c8cc6048b80038 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 28 Jun 2025 23:06:40 -0500 Subject: [PATCH] cleanup --- .../components/api/entity_iterator_macros.h | 28 ------------------- 1 file changed, 28 deletions(-) delete mode 100644 esphome/components/api/entity_iterator_macros.h 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