J. Nick Koston
2590636e48
Merge branch 'dev' into api-flash-string-progmem
2026-02-09 12:42:08 -06:00
J. Nick Koston
cf7da8e86d
fix
2026-02-09 12:34:16 -06:00
J. Nick Koston
e4ea016d1e
[ci] Block new std::to_string() usage, suggest snprintf alternatives ( #13369 )
2026-02-09 12:26:19 -06:00
J. Nick Koston
41a9588d81
[i2c] Replace switch with if-else to avoid CSWTCH table in RAM ( #13815 )
2026-02-09 12:26:06 -06:00
J. Nick Koston
cd55eb927d
[modbus] Batch UART reads to reduce loop overhead ( #13822 )
2026-02-09 12:21:15 -06:00
J. Nick Koston and Copilot
4a9ff48f02
[nextion] Batch UART reads to reduce loop overhead ( #13823 )
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-02-09 12:20:50 -06:00
J. Nick Koston
8fffe7453d
[seeed_mr24hpc1/mr60fda2/mr60bha2] Batch UART reads to reduce per-loop overhead ( #13825 )
2026-02-09 12:18:12 -06:00
J. Nick Koston
a5ee451043
[tuya] Batch UART reads to reduce per-loop overhead ( #13827 )
2026-02-09 12:17:58 -06:00
J. Nick Koston
e176cf50ab
[dfplayer] Batch UART reads to reduce per-loop overhead ( #13832 )
2026-02-09 12:15:28 -06:00
J. Nick Koston
e7a900fbaa
[rf_bridge] Batch UART reads to reduce per-loop overhead ( #13831 )
2026-02-09 12:15:15 -06:00
J. Nick Koston
623f33c9f9
[rd03d] Batch UART reads to reduce per-loop overhead ( #13830 )
2026-02-09 12:15:04 -06:00
J. Nick Koston
8b24112be5
[pipsolar] Batch UART reads to reduce per-loop overhead ( #13829 )
2026-02-09 12:14:48 -06:00
J. Nick Koston
d33f23dc43
[ld2410] Batch UART reads to reduce loop overhead ( #13820 )
2026-02-09 12:07:55 -06:00
J. Nick Koston
c43d3889b0
[modbus] Use stack buffer instead of heap vector in send() ( #13853 )
2026-02-09 12:07:42 -06:00
J. Nick Koston
50fe8e51f9
[ld2412] Batch UART reads to reduce loop overhead ( #13819 )
2026-02-09 12:07:28 -06:00
J. Nick Koston
c7883cb5ae
[ld2450] Batch UART reads to reduce loop overhead ( #13818 )
2026-02-09 12:06:38 -06:00
J. Nick Koston
3b0df145b7
[cse7766] Batch UART reads to reduce loop overhead ( #13817 )
2026-02-09 12:05:59 -06:00
J. Nick Koston
2383b6b8b4
[core] Deprecate set_retry, cancel_retry, and RetryResult ( #13845 )
2026-02-09 12:05:32 -06:00
J. Nick Koston
c658d7b57f
[api] Merge auth check into base read_message, eliminate APIServerConnection ( #13873 )
2026-02-09 12:02:02 -06:00
J. Nick Koston
dbef2e24b3
Fix variables returning non-string types, use identity check for std_string
...
- Revert variables templatable output_type back to None since variable
lambdas can return any type (float, int, etc.), not just strings.
- Use lazy import identity check (output_type is std_string) instead of
brittle string comparison in templatable().
- Clarify ESP8266 populate_service_map comment explaining why STATIC_STRING
fast path is not needed (all codegen strings are FLASH_STRING on ESP8266).
2026-02-09 11:58:55 -06:00
J. Nick Koston
9440138ac7
fix
2026-02-09 11:58:54 -06:00
Jonathan Swoboda and Claude Opus 4.6
04a6238c7b
[esp32] Set UV_CACHE_DIR inside data dir so Clean All clears it ( #13888 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-09 17:49:58 +00:00
J. Nick Koston
919afa1553
[web_server_base] Fix RP2040 compilation when Crypto-no-arduino is present ( #13887 )
2026-02-09 12:47:59 -05:00
J. Nick Koston
5cf27a8927
Merge branch 'dev' into api-flash-string-progmem
2026-02-09 11:26:46 -06:00
J. Nick Koston
5d5344cf91
Add tests for cg.templatable() auto FlashStringLiteral wrapping
...
Cover the new automatic ESPHOME_F() wrapping behavior: static strings
with std::string output_type, non-string values, None output_type,
to_exp callable/dict, and lambda passthrough.
2026-02-09 10:56:56 -06:00
J. Nick Koston
b0cf94c409
Auto-wrap static strings in ESPHOME_F() via templatable()
...
Move FlashStringLiteral wrapping from per-component manual code into
cg.templatable() itself. When output_type is std::string and the value
is a static string (not a lambda), it is automatically wrapped in
ESPHOME_F() for PROGMEM storage on ESP8266. On other platforms
ESPHOME_F() is a no-op returning const char*.
This makes all ~50 existing cg.templatable(..., cg.std_string) call
sites across every component benefit automatically, with no
per-component changes needed.
Simplify api/__init__.py by switching from output_type=None to
cg.std_string and removing the manual isinstance/FlashStringLiteral
checks that are now redundant.
2026-02-09 10:38:41 -06:00
c28c97fbaf
[mixer] Refactor for stability and to support Sendspin ( #12253 )
...
Co-authored-by: J. Nick Koston <nick@koston.org >
Co-authored-by: J. Nick Koston <nick+github@koston.org >
2026-02-09 10:19:00 -05:00
J. Nick Koston
3cde3daceb
[api] Collapse APIServerConnection intermediary layer ( #13872 )
2026-02-09 08:45:33 -06:00
J. Nick Koston
be4e573cc4
[esp32_hosted] Replace set_retry with set_interval to avoid heap allocation ( #13844 )
2026-02-09 08:45:18 -06:00
J. Nick Koston
66af998098
[dashboard] Handle malformed Basic Auth headers gracefully ( #13866 )
2026-02-09 08:45:03 -06:00
J. Nick Koston
938a11595d
[speaker] Replace set_retry with set_interval to avoid heap allocation ( #13843 )
2026-02-09 08:44:50 -06:00
J. Nick Koston
c812ac8b29
[ms8607] Replace set_retry with set_timeout chain to avoid heap allocation ( #13842 )
2026-02-09 08:44:35 -06:00
J. Nick Koston
248fc06dac
[scheduler] Eliminate heap allocation in full_cleanup_removed_items_ ( #13837 )
2026-02-09 08:44:20 -06:00
J. Nick Koston
8b8acb3b27
[dashboard] Use constant-time comparison for username check ( #13865 )
2026-02-09 08:31:06 -06:00
J. Nick Koston
1c60efa4b6
[ota] Use secrets module for OTA authentication cnonce ( #13863 )
2026-02-09 08:30:49 -06:00
J. Nick Koston
4ef238eb7b
[analyze-memory] Attribute third-party library symbols via nm scanning ( #13878 )
2026-02-09 08:26:03 -06:00
J. Nick Koston
c990da265a
Add unit tests for FlashStringLiteral
...
Cover the three lines reported uncovered by codecov in
cpp_generator.py (FlashStringLiteral.__init__ and __str__).
2026-02-09 07:45:03 -06:00
J. Nick Koston
91487e7f14
[api] Store HomeAssistant action strings in PROGMEM on ESP8266
...
On ESP8266, .rodata is copied to RAM at boot. Every string literal in
HomeAssistantServiceCallAction (service names, data keys, data values)
permanently consumes RAM even though the action may rarely fire.
Add FLASH_STRING type to TemplatableValue that stores PROGMEM pointers
on ESP8266 via the existing __FlashStringHelper* type. At play() time,
strings are copied from flash to temporary std::string storage — safe
because service calls are not in the hot path.
Add FlashStringLiteral codegen helper (cg.FlashStringLiteral) that wraps
strings in ESPHOME_F() — expands to F() on ESP8266 (PROGMEM), plain
string on other platforms (no-op). This helper can be adopted by other
components incrementally.
On non-ESP8266 platforms, FLASH_STRING is never set and all existing
code paths are unchanged.
2026-02-09 07:39:06 -06:00
J. Nick Koston
22c77866d8
[e131] Remove unnecessary heap allocation from packet receive loop ( #13852 )
2026-02-09 06:42:26 -06:00
J. Nick Koston
790ac620ab
[web_server_idf] Use C++17 nested namespace style ( #13856 )
2026-02-09 06:42:12 -06:00
tronikos
fb93283720
[water_heater] Add state masking to distinguish explicit commands from no-change ( #13879 )
2026-02-09 03:52:49 -06:00
J. Nick Koston
bed01da345
[api] Guard varint parsing against overlong encodings ( #13870 )
2026-02-09 03:45:40 -06:00
J. Nick Koston
422f413680
[lps22] Replace set_retry with set_interval to avoid heap allocation ( #13841 )
2026-02-09 03:26:44 -06:00
J. Nick Koston
c3c0c40524
[mqtt] Return friendly_name_() by const reference to avoid string copies ( #13810 )
2026-02-09 03:26:29 -06:00
J. Nick Koston
46f8302d8f
[mqtt] Use stack buffer for discovery topic to avoid heap allocation ( #13812 )
2026-02-09 03:26:15 -06:00
J. Nick Koston
e24528c842
[analyze-memory] Attribute CSWTCH symbols from SDK archives ( #13850 )
2026-02-09 03:25:59 -06:00
J. Nick Koston
5370687001
[wizard] Use secrets module for fallback AP password generation ( #13864 )
2026-02-09 03:25:41 -06:00
J. Nick Koston
6ee185c58a
[dashboard] Use resolve/relative_to for download path validation ( #13867 )
2026-02-09 03:25:23 -06:00
J. Nick Koston
eb6a6f8d0d
[web_server_idf] Remove unused host() method ( #13869 )
2026-02-09 03:25:05 -06:00
J. Nick Koston
140ec0639c
[api] Elide empty message construction in protobuf dispatch ( #13871 )
2026-02-09 03:24:45 -06:00