J. Nick Koston 0b2f79480b [api] Use StringRef for user service string arguments
Replace std::string with StringRef (non-owning string view) for
user service string arguments in YAML-generated services. This
avoids unnecessary heap allocation when the protobuf decode buffer
already contains the string data.

Key changes:
- Frame helpers reserve +1 byte in rx_buf_ so string fields can be
  safely null-terminated in-place after decode
- Add (null_terminate) protobuf field option to target only fields
  that need it (ExecuteServiceArgument.string_ and
  HomeAssistantStateResponse.state)
- Add StringRef template specializations for get_execute_arg_value
  and to_service_arg_type
- Python codegen uses StringRef for string service args, with
  automatic std::string fallback when deferred actions (delay,
  wait_until, script.wait) are present in the action chain
- Add deferred flag to action registry for detecting actions that
  store trigger args for later execution
- Simplify HomeAssistantStateResponse handler by removing
  SmallBufferWithHeapFallback copy (state is null-terminated
  in-place)
- Add compare() method to StringRef for external component
  compatibility

Saves ~240 bytes of flash on ESP8266 by eliminating std::string
template instantiations for user service string arguments.
2026-02-12 19:51:39 -06:00
2023-06-12 17:00:34 +12:00
2022-09-06 15:48:01 +12:00
2025-12-21 09:26:03 -05:00
2024-03-28 10:20:51 +13:00
2025-07-17 22:40:28 +12:00
2025-12-08 14:37:45 -05:00
2026-02-12 23:04:19 +13:00
2025-07-17 22:40:28 +12:00
2026-02-11 22:11:48 -05:00
2025-12-05 08:48:04 -05:00
S
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
605 MiB
Languages
C++ 56.1%
Python 43.3%
C 0.3%
JavaScript 0.2%