Apply review cleanups and deprecate get_name() off ESP8266

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.
This commit is contained in:
J. Nick Koston
2026-10-08 17:18:00 -10:00
parent 4ef86fe534
commit 6f5108eb70
19 changed files with 86 additions and 94 deletions
@@ -31,7 +31,7 @@ def test_binary_sensor_sets_mandatory_fields(generate_main):
)
# Then
assert 'App.register_binary_sensor(bs_1, "test bs1",' in main_cpp
assert 'App.register_binary_sensor(bs_1, ESPHOME_PSTR("test bs1"),' in main_cpp
assert "bs_1->set_pin(" in main_cpp