This commit is contained in:
J. Nick Koston 2025-06-28 23:01:48 -05:00
parent 128bd76f20
commit a3eeb46961
No known key found for this signature in database
3 changed files with 8 additions and 2 deletions

View File

@ -3,6 +3,9 @@
#include "esphome/core/defines.h" #include "esphome/core/defines.h"
#ifdef USE_API #ifdef USE_API
namespace esphome {
namespace api {
// Macro-based approach to eliminate duplication without runtime overhead // Macro-based approach to eliminate duplication without runtime overhead
// This generates the entity handler methods at compile time // This generates the entity handler methods at compile time
@ -24,4 +27,7 @@
LIST_ENTITIES_HANDLER(entity_type, EntityClass, ResponseType) \ LIST_ENTITIES_HANDLER(entity_type, EntityClass, ResponseType) \
INITIAL_STATE_HANDLER(entity_type, EntityClass) INITIAL_STATE_HANDLER(entity_type, EntityClass)
} // namespace api
} // namespace esphome
#endif // USE_API #endif // USE_API

View File

@ -91,4 +91,4 @@ bool ListEntitiesIterator::on_service(UserServiceDescriptor *service) {
} // namespace api } // namespace api
} // namespace esphome } // namespace esphome
#endif #endif

View File

@ -72,4 +72,4 @@ InitialStateIterator::InitialStateIterator(APIConnection *client) : client_(clie
} // namespace api } // namespace api
} // namespace esphome } // namespace esphome
#endif #endif