1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-24 06:02:21 +01:00

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

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

View File

@@ -10,7 +10,7 @@
namespace esphome {
#ifdef USE_API
#ifdef USE_API_SERVICES
namespace api {
class UserServiceDescriptor;
} // namespace api
@@ -45,7 +45,7 @@ class ComponentIterator {
#ifdef USE_TEXT_SENSOR
virtual bool on_text_sensor(text_sensor::TextSensor *text_sensor) = 0;
#endif
#ifdef USE_API
#ifdef USE_API_SERVICES
virtual bool on_service(api::UserServiceDescriptor *service);
#endif
#ifdef USE_CAMERA
@@ -122,7 +122,7 @@ class ComponentIterator {
#ifdef USE_TEXT_SENSOR
TEXT_SENSOR,
#endif
#ifdef USE_API
#ifdef USE_API_SERVICES
SERVICE,
#endif
#ifdef USE_CAMERA