J. Nick Koston
e42cc2e394
Add query_has_key for efficient hasArg without string allocation
...
hasArg only needs to know if a key exists, not its value.
query_has_key uses a 1-byte buffer and checks the return code
from httpd_query_key_value — no url_decode, no std::string.
2026-02-11 18:23:38 -06:00
J. Nick Koston
592d5ec24c
Restore hasArg guard in parse_string_param_
...
Empty string is a valid value for string params (e.g. select
options). Must use hasArg to distinguish missing from empty.
2026-02-11 18:17:24 -06:00
J. Nick Koston
91a0b0989e
Simplify captive_portal lambda capture
...
Capture auto type directly and use c_str() overload of
save_wifi_sta. Works on both std::string and Arduino String.
2026-02-11 18:14:46 -06:00
J. Nick Koston
f35dfefdf3
Remove readability-redundant-string-cstr NOLINTs from captive_portal
...
Use const auto& to bind arg() result directly. Construct
std::string only in deferred lambda capture where ownership
is needed.
2026-02-11 18:13:32 -06:00
J. Nick Koston
892804e02e
Remove remaining readability-redundant-string-cstr NOLINTs
...
Use const auto& to bind arg() result directly, avoiding
unnecessary std::string intermediate copies. Construct
std::string only where needed (lambda capture, setter call).
2026-02-11 18:12:47 -06:00
J. Nick Koston
5585b5967e
Avoid std::string copy in date/time/datetime handlers
...
Use const auto& to bind directly to arg() result (std::string on
IDF, Arduino String on Arduino) and pass c_str()/length() to the
setter. No intermediate std::string copy needed.
2026-02-11 18:11:49 -06:00
J. Nick Koston
73867c62be
Pass c_str() and size() directly to date/time/datetime setters
...
These setters have (const char*, size_t) overloads that do the
actual work. Skip the std::string& overload indirection.
2026-02-11 18:10:43 -06:00
J. Nick Koston
920f84fa1d
Eliminate double lookups in parse_string_param_ and date/time/datetime handlers
...
- parse_string_param_: use arg() and check empty instead of hasArg+arg
- date/time/datetime: inline arg() call to avoid redundant hasArg+parse_string_param_ triple lookup
2026-02-11 18:08:23 -06:00
J. Nick Koston
c2bb55ff5d
Add NOLINT for length() > 0 cross-platform check
...
Arduino String has isEmpty() not empty(). Using length() > 0
works on both std::string and Arduino String.
2026-02-11 18:03:32 -06:00
J. Nick Koston
c6b51d3434
Fix clang-tidy: disambiguate overloaded climate setters
...
ClimateCall has overloaded set_target_temperature*(float) and
set_target_temperature*(optional<float>), so the compiler can't
infer NumT. Use static_cast to select the float overload.
2026-02-11 18:02:56 -06:00
J. Nick Koston
f638b65f1e
Fix Arduino build: use length() instead of empty()
...
Arduino String has isEmpty() not empty(). Use length() > 0
which works on both std::string and Arduino String.
2026-02-11 17:57:49 -06:00
J. Nick Koston
f92725f76e
Eliminate double query lookups and unify numeric parse helpers
...
- Mark find_query_value_ as const
- Remove redundant hasArg() guards where parse_number() already
handles empty strings (returns nullopt)
- Use !empty() instead of hasArg() for parse_bool_param_
- Merge parse_float_param_ and parse_int_param_ into single
parse_num_param_ template
- Combine missing/empty checks for IR data parameter
2026-02-11 17:54:56 -06:00
J. Nick Koston
2a89088bc3
Merge branch 'dev' into web_server_use_arg_api
2026-02-11 17:43:10 -06:00
J. Nick Koston
ae42bfa404
[web_server_idf] Remove std::string temporaries from multipart header parsing ( #13940 )
2026-02-11 17:42:33 -06:00
J. Nick Koston
fecb145a71
[web_server_idf] Revert multipart upload buffer back to heap to fix httpd stack overflow ( #13941 )
2026-02-11 17:42:18 -06:00
J. Nick Koston
db831ebee0
Fix clang-tidy: use const auto& for arg() return value
...
On Arduino, arg() returns const String&, so auto copies unnecessarily.
const auto& binds to the reference on Arduino and extends the temporary
lifetime on IDF.
2026-02-11 17:37:09 -06:00
J. Nick Koston
4f3c95ced2
[web_server] Switch from getParam to arg API to eliminate heap allocations
...
Switch all web_server callers from getParam()/hasParam() to arg()/hasArg().
Both APIs exist on Arduino ESPAsyncWebServer and our IDF implementation.
On the IDF side, getParam() allocated a new AsyncWebParameter on the heap
for every successful lookup, cached it in a vector, and required cleanup
in the destructor. No caller ever held the pointer or called getParam
twice with the same name - every use was just getParam("x")->value()
immediately.
Rewrite IDF arg()/hasArg() to call query_key_value() directly, bypassing
getParam entirely. The linker strips the now-unreferenced getParam,
AsyncWebParameter, and cache machinery.
Saves ~348 bytes flash on ESP32-IDF, ~272 bytes on ESP8266 Arduino.
2026-02-11 17:33:11 -06:00
J. Nick Koston
e12ed08487
[wifi] Add CompactString to reduce WiFi scan heap fragmentation ( #13472 )
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-02-11 21:24:24 +00:00
tomaszduda23
374cbf4452
[nrf52,zigbee] count sleep time of zigbee thread ( #13933 )
...
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com >
2026-02-11 21:21:10 +00:00
dependabot[bot]
7287a43f2a
Bump docker/build-push-action from 6.18.0 to 6.19.1 in /.github/actions/build-image ( #13937 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-11 15:12:05 -06:00
J. Nick Koston
483b7693e1
[api] Fix debug asserts in production code, encode_bool bug, and reduce flash overhead ( #13936 )
...
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com >
2026-02-11 13:57:08 -06:00
J. Nick Koston
c9c125aa8d
[socket] Devirtualize Socket::ready() and implement working ready() for LWIP raw TCP ( #13913 )
...
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com >
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-02-11 17:54:58 +00:00
schrob
8d62a6a88a
[openthread] Fix warning on old C89 implicit field zero init ( #13935 )
2026-02-11 11:54:31 -06:00
J. Nick Koston
0ec02d4886
[preferences] Replace per-element erase with clear() in sync() ( #13934 )
2026-02-11 11:41:53 -06:00
Nate Clark
1411868a0b
[mqtt.cover] Add option to publish states as JSON payload ( #12639 )
...
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-02-11 11:40:27 -06:00
J. Nick Koston
069c90ec4a
[api] Split process_batch_ to reduce stack on single-message hot path ( #13907 )
2026-02-11 11:34:43 -06:00
J. Nick Koston
930a186168
[web_server_idf] Use constant-time comparison for Basic Auth ( #13868 )
2026-02-11 11:03:27 -06:00
Djordje Mandic
b1f0db9da8
[bl0942] Update reference values ( #12867 )
2026-02-11 11:10:32 -05:00
J. Nick Koston
923445eb5d
[light] Eliminate redundant clamp in LightCall::validate_() ( #13923 )
2026-02-11 10:06:44 -06:00
tomaszduda23
9bdae5183c
[nrf52,logger] add support for task_log_buffer_size ( #13862 )
...
Co-authored-by: J. Nick Koston <nick@home-assistant.io >
2026-02-11 15:43:55 +00:00
J. Nick Koston
37f97c9043
[esp8266][rp2040] Eliminate heap fallback in preference save/load ( #13928 )
2026-02-11 08:41:15 -06:00
J. Nick Koston
8e785a2216
[web_server] Remove unnecessary packed attribute from DeferredEvent ( #13932 )
2026-02-11 08:40:41 -06:00
schrob
4fb1ddf212
[api] Fix compiler format warnings ( #13931 )
2026-02-11 08:40:21 -06:00
J. Nick Koston
38bba3f5a2
[scheduler] Reduce set_timer_common_ hot path size by 25% ( #13899 )
2026-02-11 16:42:13 +13:00
J. Nick Koston
225c13326a
[core] Extract dump_config from Application::loop() hot path ( #13900 )
2026-02-11 16:41:07 +13:00
J. Nick Koston
5281fd3273
[api] Extract cold code from APIConnection::loop() hot path ( #13901 )
2026-02-11 16:30:34 +13:00
J. Nick Koston
e3bafc1b45
[esp32_ble] Extract state transitions from ESP32BLE::loop() hot path ( #13903 )
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-02-11 16:29:29 +13:00
Thomas Rupprecht
42bc0994f1
[rtttl] Code Improvements ( #13653 )
...
Co-authored-by: Keith Burzinski <kbx81x@gmail.com >
2026-02-10 22:10:29 -05:00
J. Nick Koston
58659e4893
[mdns] Throttle MDNS.update() polling on ESP8266 and RP2040 ( #13917 )
2026-02-10 18:48:13 -06:00
Jonathan Swoboda
b4707344d3
[esp32] Upgrade uv to 0.10.1 and increase HTTP retries ( #13918 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-11 00:44:12 +00:00
Jonathan Swoboda
548b7e5dab
[esp32] Fix ESP32-P4 test: replace stale esp_hosted component ref ( #13920 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-11 00:04:12 +00:00
Jesse Hills
b9c2be8228
Merge branch 'release' into dev
2026-02-11 11:13:33 +13:00
Jesse Hills
fb2f0ce62f
Merge pull request #13915 from esphome/bump-2026.1.5
...
2026.1.5
2026.1.5
2026-02-11 11:13:08 +13:00
J. Nick Koston
d152438335
[libretiny] Update LibreTiny to v1.12.1 ( #13851 )
2026-02-10 20:07:09 +00:00
J. Nick Koston
868a2151e3
[web_server_idf] Reduce heap allocations by using stack buffers ( #13549 )
2026-02-10 13:56:12 -06:00
J. Nick Koston
c65d3a0072
[mqtt] Add zero-allocation topic getters to MQTT_COMPONENT_CUSTOM_TOPIC macro ( #13811 )
2026-02-10 13:55:16 -06:00
J. Nick Koston
e2fad9a6c9
[sprinkler] Convert state and request origin strings to PROGMEM_STRING_TABLE ( #13806 )
2026-02-10 13:55:01 -06:00
J. Nick Koston
5365faa877
[debug] Move ESP8266 switch tables to flash with PROGMEM_STRING_TABLE ( #13813 )
2026-02-10 13:54:48 -06:00
J. Nick Koston
86feb4e27a
[rtttl] Convert state_to_string to PROGMEM_STRING_TABLE ( #13807 )
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-02-10 13:54:37 -06:00
J. Nick Koston
2a6d9d6325
[mqtt] Avoid heap allocation in on_log by using const char* publish overload ( #13809 )
2026-02-10 13:54:22 -06:00