1
0
mirror of https://github.com/esphome/esphome.git synced 2026-02-08 08:41:59 +00:00
Commit Graph

21831 Commits

Author SHA1 Message Date
J. Nick Koston
ba40fbc53d Merge remote-tracking branch 'origin/mqtt-custom-topic-no-alloc' into integration 2026-02-06 21:01:53 +01:00
J. Nick Koston
c8d4d870e8 [mqtt] Use .c_str() for StringRef payloads to match non-allocating publish overload 2026-02-06 21:00:53 +01:00
J. Nick Koston
fcb458e449 Merge branch 'mqtt-discovery-topic-no-alloc' into integration 2026-02-06 20:57:47 +01:00
J. Nick Koston
48a8f753f5 Merge branch 'mqtt-custom-topic-no-alloc' into integration 2026-02-06 20:57:40 +01:00
J. Nick Koston
6293f3110c Merge branch 'mqtt-friendly-name-const-ref' into integration 2026-02-06 20:57:35 +01:00
J. Nick Koston
ce34b37e02 Merge branch 'mqtt-on-log-no-heap' into integration 2026-02-06 20:57:29 +01:00
J. Nick Koston
b454cac1dc [mqtt] Use stack buffer for discovery topic to avoid heap allocation 2026-02-06 20:48:18 +01:00
J. Nick Koston
a9a943b858 [mqtt] Add zero-allocation topic getters to MQTT_COMPONENT_CUSTOM_TOPIC macro
Add _to() variants that write into a stack buffer and return StringRef,
avoiding heap allocation on every publish. Update publish_state() in
climate (11 allocations eliminated), fan (3), cover (2), and valve (1)
to use the new stack-based getters.

The allocating getters are retained for setup-time paths (subscribe,
send_discovery, dump_config) where the allocation is one-time.
2026-02-06 20:41:51 +01:00
J. Nick Koston
85c1660edf [mqtt] Return friendly_name_() by const reference to avoid string copies 2026-02-06 20:38:33 +01:00
J. Nick Koston
664baac09e [mqtt] Avoid heap allocation in on_log by using const char* publish overload
The on_log callback was constructing a temporary MQTTMessage struct which
copied the log_message_ topic string and created a new std::string from
the message buffer on every log line. This is called frequently at runtime
and contributes to heap fragmentation.

Use the const char* publish overload directly to avoid both allocations.
2026-02-06 20:32:04 +01:00
J. Nick Koston
b247e4a213 Merge remote-tracking branch 'upstream/dev' into integration 2026-02-06 20:12:59 +01:00
J. Nick Koston
86f91eed2f [mqtt] Move switch string tables to PROGMEM_STRING_TABLE (#13802)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-02-06 19:30:05 +01:00
J. Nick Koston
ea7aeb2507 Merge branch 'uart_partity' into integration 2026-02-06 19:25:08 +01:00
J. Nick Koston
61b2416a7c Merge branch 'bmp_progmem' into integration 2026-02-06 19:24:52 +01:00
J. Nick Koston
41cecbfb0f [template] Convert alarm sensor type to PROGMEM_STRING_TABLE and narrow enum to uint8_t (#13804) 2026-02-06 18:22:26 +00:00
J. Nick Koston
e3b547b1b0 [bmp3xx_base/bmp581_base] Convert oversampling and IIR filter strings to PROGMEM_STRING_TABLE 2026-02-06 19:22:11 +01:00
J. Nick Koston
93dd8d0e4f Merge branch 'rtttl_progmem' into integration 2026-02-06 19:19:07 +01:00
J. Nick Koston
12b3e95ed3 [rtttl] Convert state_to_string to PROGMEM_STRING_TABLE 2026-02-06 19:18:27 +01:00
J. Nick Koston
a94c0f745f Merge branch 'sprinkler_progmem' into integration 2026-02-06 19:16:49 +01:00
J. Nick Koston
7fc3b1ddfe [sprinkler] Convert state and request origin strings to PROGMEM_STRING_TABLE 2026-02-06 19:16:13 +01:00
J. Nick Koston
ca33d4111b [uart] Convert parity_to_str to PROGMEM_STRING_TABLE 2026-02-06 19:11:10 +01:00
Jonathan Swoboda
9315da79bc [core] Add missing requests dependency to requirements.txt (#13803)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 13:03:16 -05:00
J. Nick Koston
4325c86b0a Merge branch 'template_alarm_progmem' into integration 2026-02-06 19:01:49 +01:00
J. Nick Koston
e3b9c9362d [template] Convert alarm sensor type to PROGMEM_STRING_TABLE and narrow enum to uint8_t 2026-02-06 18:58:19 +01:00
J. Nick Koston
11882bc6fa Merge branch 'mqtt_progmem_table' into integration 2026-02-06 18:54:52 +01:00
PolarGoose
155447f541 [dsmr] Fix issue with parsing lines like 1-0:0.2.0((ER11)) (#13780) 2026-02-06 12:53:59 -05:00
J. Nick Koston
b908d6ad04 [mqtt] Move switch string tables to PROGMEM_STRING_TABLE 2026-02-06 18:53:33 +01:00
J. Nick Koston
238e40966f [light] Move CSWTCH lookup table to PROGMEM in get_suitable_color_modes_mask_ (#13801) 2026-02-06 17:33:26 +00:00
J. Nick Koston
29e73ef317 Merge remote-tracking branch 'upstream/dev' into integration 2026-02-06 18:25:47 +01:00
J. Nick Koston
f9192b5f75 [wifi] Avoid jump tables in LOG_STR switch statements to save ESP8266 RAM (#13799) 2026-02-06 18:20:46 +01:00
J. Nick Koston
2917057da8 [analyze-memory] Trace CSWTCH switch table symbols to source components (#13798)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2026-02-06 18:08:30 +01:00
J. Nick Koston
6464fcbc14 Merge branch 'light_cswitch' into integration 2026-02-06 18:03:40 +01:00
J. Nick Koston
305e0172f3 [light] Move CSWTCH lookup table to PROGMEM in get_suitable_color_modes_mask_ 2026-02-06 17:58:30 +01:00
J. Nick Koston
378f608aad Merge branch 'cswitch_analyzer' into integration 2026-02-06 17:41:30 +01:00
J. Nick Koston
9712c1062f Merge remote-tracking branch 'upstream/dev' into integration 2026-02-06 17:41:17 +01:00
J. Nick Koston
c7c9ffe7e1 [light] Convert color_mode_to_human to PROGMEM_STRING_TABLE using to_bit() (#13797) 2026-02-06 17:38:03 +01:00
J. Nick Koston
368ef5687b [update] Move update_state_to_string to update component and convert to PROGMEM_STRING_TABLE (#13796)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-06 17:37:41 +01:00
J. Nick Koston
b7dc975331 [core] Convert entity string lookups to PROGMEM_STRING_TABLE (#13794) 2026-02-06 17:37:19 +01:00
J. Nick Koston
44f308502e [gpio] Convert interrupt_type_to_string to PROGMEM_STRING_TABLE (#13795)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-06 17:37:02 +01:00
J. Nick Koston
ec477801ca [wifi] Defer ESP8266 WiFi listener callbacks from system context to main loop (#13789) 2026-02-06 16:23:19 +00:00
J. Nick Koston
16ef68ea4d bot review 2026-02-06 17:10:14 +01:00
J. Nick Koston
21c4fb3880 bot review 2026-02-06 17:09:46 +01:00
J. Nick Koston
82587fe854 bot review 2026-02-06 17:07:47 +01:00
J. Nick Koston
1d627b47b7 Merge remote-tracking branch 'origin/wifi_no_jump_tables' into integration 2026-02-06 16:52:15 +01:00
J. Nick Koston
f71d6c615a missed one 2026-02-06 16:51:58 +01:00
J. Nick Koston
9272967096 Merge remote-tracking branch 'origin/wifi_no_jump_tables' into integration 2026-02-06 16:50:09 +01:00
J. Nick Koston
9914293777 Merge branch 'cswitch_analyzer' into integration 2026-02-06 16:49:58 +01:00
J. Nick Koston
0e3e060fce [wifi] Avoid jump tables in LOG_STR switch statements to save ESP8266 RAM 2026-02-06 16:49:24 +01:00
J. Nick Koston
c892174378 [analyze-memory] Trace CSWTCH switch table symbols to source components 2026-02-06 16:48:08 +01:00
J. Nick Koston
bbfa4c69af Merge branch 'light_progmem_str' into integration 2026-02-06 16:21:44 +01:00