Conditionally compile API user services to save 4.3KB flash (follow-up to #9262) (#9451)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2025-07-11 19:08:03 -10:00
1 parent 0138ef36cf
commit dd5ba5a90c
23 files changed
+345 -52

No files matched your search

+2
View File
@@ -83,10 +83,12 @@ bool ListEntitiesIterator::on_end() { return this->client_->send_list_info_done(
ListEntitiesIterator::ListEntitiesIterator(APIConnection *client) : client_(client) {}
#ifdef USE_API_SERVICES
bool ListEntitiesIterator::on_service(UserServiceDescriptor *service) {
auto resp = service->encode_list_service_response();
return this->client_->send_message(resp);
}
#endif
} // namespace api
} // namespace esphome