Long or unforced progmem strings encode through encode_progmem_bytes, which
API action strings need. The ProgmemStringRef tests move to their own file.
ProgmemStringRef now holds a StringRef, so get_name() and friendly_name_() can
keep returning const StringRef & on other platforms. External components that
return get_name() from a const StringRef & getter would otherwise return a
reference to a temporary. friendly_name_() is deprecated there, not removed.
Only unnamed entities hash at runtime, and their fallback name is in RAM, so
configure_entity_ hashes it before wrapping and named entities keep the codegen
hash; fnv1_hash_object_id_P is no longer needed. On ESP8266 the short string
encoder uses the outlined flash safe copy for RAM strings too.
mqtt puts the name into the discovery JSON straight from flash, the pid
autotuner keeps the entity's log name instead of a std::string, and
prometheus prints names and ids without building a std::string per scrape.
Progmem string fields must take the short encode path, the outlined encode
helper takes a ProgmemStringRef, and the hasher test checks the Python value.
valve_name() returned a flash pointer on ESP8266; it now follows get_name():
static_assert there, deprecated elsewhere, with valve_log_name() for logs.
Extend the progmem proto option to string fields and mark the entity info
name field with it, so ListEntities copies the name once instead of through
a stack buffer.
ProgmemStringRef owns write_to() and equals() with the platform split, so the
EntityBase accessors are inline forwarders. Adds ESPHOME_ENTITY_NAME_MAX_LEN
mirroring NAME_MAX_LENGTH and tidies the codegen and tests.
ProgmemStringRef has no byte-reading operations, so new comparisons or copies
of name_ fail to compile. c_str() stays for external log-only users and is
deprecated until 2027.5.0; in-tree logs now use get_log_name().
Inline get_name_to() off ESP8266, add write_name_to() and name_equals() so
web_server avoids copies, always emit ESPHOME_PSTR, and follow the get_icon()
pattern: get_name() is a static_assert stub on ESP8266 and ESPDEPRECATED
elsewhere until 2027.5.0.
On ESP8266 codegen emits entity names with PSTR and EntityBase::get_name()
is removed there. get_name_to() copies the name into a caller buffer and
get_log_name() returns it for %s log arguments; both exist on every platform.