J. Nick Koston 4810c36141 [api] Store YAML service names in flash instead of heap
Reduces memory usage for YAML-defined API services by storing service
names and argument names as pointers to string literals in flash instead
of heap-allocated std::string objects.

Implementation:
- Created UserServiceBase<Ts...> for YAML services (const char* storage)
- Created UserServiceDynamic<Ts...> for custom_api_device (std::string storage)
- Updated CustomAPIDeviceService to inherit from UserServiceDynamic
- UserServiceTrigger uses UserServiceBase (YAML-only)

Memory savings per YAML service:
- 0 args: 32 bytes (57% reduction)
- 2 args: 48 bytes (60% reduction)
- 5 args: 96 bytes (63% reduction)

Custom API device services maintain same memory footprint (no regression).

Typical ESPHome device (2-5 services): 100-240 bytes saved
High-service device (10+ services): 400-800 bytes saved

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 18:49:58 -06:00
2025-11-05 16:44:06 -06:00
2023-06-12 17:00:34 +12:00
2025-10-17 17:13:24 -10:00
2022-09-06 15:48:01 +12:00
2024-03-28 10:20:51 +13:00
2025-07-17 22:40:28 +12:00
2025-10-08 21:14:45 +13:00
2025-07-17 22:40:28 +12:00
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme Multiple Licenses 400 MiB
Languages
C++ 64.2%
Python 35.5%
C 0.2%