mirror of
https://github.com/esphome/esphome.git
synced 2026-07-11 09:25:34 +00:00
9bf0133525
Specialize TemplatableValue so non-string types use function-pointer-only storage (4 bytes on 32-bit) instead of the tagged union with std::function support (8 bytes). The std::string specialization retains full support for VALUE, STATIC_STRING, FLASH_STRING, and stateful lambdas. Codegen now wraps non-string constants in stateless lambdas automatically, so the generated C++ always assigns a function pointer.