mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-26 12:43:48 +00:00 
			
		
		
		
	reduce
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user