mirror of
https://github.com/esphome/esphome.git
synced 2025-08-09 11:57:46 +00:00
reduce
This commit is contained in:
parent
128bd76f20
commit
a3eeb46961
@ -3,6 +3,9 @@
|
||||
#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
|
||||
|
||||
@ -24,4 +27,7 @@
|
||||
LIST_ENTITIES_HANDLER(entity_type, EntityClass, ResponseType) \
|
||||
INITIAL_STATE_HANDLER(entity_type, EntityClass)
|
||||
|
||||
} // namespace api
|
||||
} // namespace esphome
|
||||
|
||||
#endif // USE_API
|
@ -91,4 +91,4 @@ bool ListEntitiesIterator::on_service(UserServiceDescriptor *service) {
|
||||
|
||||
} // namespace api
|
||||
} // namespace esphome
|
||||
#endif
|
||||
#endif
|
||||
|
@ -72,4 +72,4 @@ InitialStateIterator::InitialStateIterator(APIConnection *client) : client_(clie
|
||||
|
||||
} // namespace api
|
||||
} // namespace esphome
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user