Commit Graph

22574 Commits

Author SHA1 Message Date
J. Nick Koston
8975ff8e1b Merge branch 'constexpr-tlc59208f' into integration 2026-02-17 21:56:15 -06:00
J. Nick Koston
c7cf98d3e8 Merge branch 'constexpr-pca9685' into integration 2026-02-17 21:56:09 -06:00
J. Nick Koston
68647fcdbe [tlc59208f] Make mode constants inline constexpr
Convert TLC59208F_MODE2_* constants from extern const to inline
constexpr so the compiler can use immediate values instead of memory
loads.
2026-02-17 21:49:49 -06:00
J. Nick Koston
8080aa4a34 [pca9685] Make mode constants inline constexpr
Convert PCA9685_MODE_* constants from extern const to inline constexpr
so the compiler can use immediate values instead of memory loads.
2026-02-17 21:49:11 -06:00
J. Nick Koston
ae5aebf80f Merge branch 'constexpr-constants' into integration 2026-02-17 21:34:40 -06:00
J. Nick Koston
cae80add8e Merge remote-tracking branch 'origin/optimize-warn-blocking-guard' into integration 2026-02-17 21:34:33 -06:00
J. Nick Koston
2a5ae59c20 [core] Optimize WarnIfComponentBlockingGuard::finish() hot path
Split the rarely-taken warning path into a separate noinline cold
function so the hot path (called every component every loop iteration)
is minimal. Also make WARN_IF_BLOCKING_OVER_MS constexpr so the
compiler uses an immediate compare instead of a memory load, and
merge the two ESP_LOGW calls into one.

finish() shrinks from 108 to 30 bytes. Total flash savings: -116 bytes.
2026-02-17 21:29:20 -06:00
J. Nick Koston
2d61d442cf [core] Make setup_priority and component state constants constexpr
Convert setup_priority floats, component state uint8_t constants, and
status LED constants from extern const (defined in component.cpp) to
inline constexpr in the header. This lets the compiler use immediate
values instead of memory loads across all translation units.

Also removes the dead HARDWARE_LATE declaration (declared extern but
never defined).

Saves ~364 bytes flash on ESP32-S3.
2026-02-17 21:27:03 -06:00
Jesse Hills
a3d7e76992 Merge branch 'beta' into dev 2026-02-18 13:29:11 +13:00
Jesse Hills
973656191b Merge pull request #14038 from esphome/bump-2026.2.0b4
2026.2.0b4
2026.2.0b4
2026-02-18 13:28:37 +13:00
Jesse Hills
d9f493ab7a Bump version to 2026.2.0b4 2026-02-18 10:13:41 +13:00
schrob
a0c4fa6496 [openthread] Fix compiler format warning (#14030) 2026-02-18 10:13:41 +13:00
J. Nick Koston
18b4818fb1 Merge branch 'web_server_reduce_set_json_id' into integration 2026-02-17 14:52:00 -06:00
dependabot[bot]
5bb863f7da Bump actions/stale from 10.1.1 to 10.2.0 (#14036)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-17 13:24:39 -06:00
J. Nick Koston
75e5ba93cd Merge remote-tracking branch 'upstream/dev' into integration 2026-02-17 13:21:13 -06:00
Rodrigo Martín
81ed70325c [esp32_ble_server] fix infinitely large characteristic value (#14011) 2026-02-17 07:45:21 -10:00
schrob
e826d71bd8 [openthread] Fix compiler format warning (#14030) 2026-02-17 10:16:57 -05:00
J. Nick Koston
090b85742b [web_server] Reduce set_json_id code size by ~48 bytes
Reuse a single stack buffer for both name_id and legacy id
construction instead of two separate buffers. ArduinoJson
copies from char* before the buffer is overwritten.

Use .c_str() instead of passing StringRef directly to
ArduinoJson assignments, routing through the already-
instantiated set<const char*> template and eliminating
the 24-byte set<StringRef> wrapper from the binary.
2026-02-16 23:46:49 -06:00
J. Nick Koston
4cd3f6c36a [api] Remove unused reserve from APIServer constructor (#14017) 2026-02-17 16:30:57 +13:00
Jesse Hills
6b4b8cb2f9 Merge branch 'beta' into dev 2026-02-17 16:22:46 +13:00
Jesse Hills
fd43bd2b7e Merge pull request #14025 from esphome/bump-2026.2.0b3
2026.2.0b3
2026.2.0b3
2026-02-17 16:22:12 +13:00
J. Nick Koston
aeefb7fc43 Merge branch 'http_request_remove_list' into integration 2026-02-16 19:49:45 -06:00
J. Nick Koston
4d5010db5d [http_request] Replace std::list<Header> with std::vector<Header> in perform() chain
std::list uses per-node heap allocation (one allocation per element)
and has poor cache locality. std::vector is contiguous and uses a
single allocation.

Changes:
- Replace std::list<Header> with std::vector<Header> in perform()
  virtual method signature across all platforms (IDF, Arduino, Host)
- Update all start(), get(), post() overloads accordingly
- Add ESPDEPRECATED overloads for std::list<Header> callers
- Update online_image to use std::vector<Header>
- Clean up request_headers construction in play() using structured
  bindings and reserve()
2026-02-16 19:37:38 -06:00
J. Nick Koston
0797ece7ce Merge branch 'http_request_remove_action_maps' into integration 2026-02-16 19:19:11 -06:00
J. Nick Koston
3cc096188c [http_request] Use FixedVector for request_headers_ and json_ in action
The sizes are known at Python codegen time, so use FixedVector with
init() for a single allocation and no reallocation machinery. This
eliminates _M_realloc_append template instantiations for these types.
2026-02-16 19:18:25 -06:00
J. Nick Koston
999ebf9496 [http_request] Use FixedVector for request_headers_ and json_ in action
The sizes are known at Python codegen time, so use FixedVector with
init() for a single allocation and no reallocation machinery. This
eliminates _M_realloc_append template instantiations for these types.
2026-02-16 19:18:11 -06:00
J. Nick Koston
24fa4a137d Merge branch 'http_request_remove_action_maps' into integration 2026-02-16 19:12:54 -06:00
J. Nick Koston
87e998f455 [http_request] Replace std::map with std::vector<std::pair> in action template
request_headers_ and json_ are populated at config time via
add_request_header()/add_json() and only iterated linearly at
runtime. std::map's red-black tree is unnecessary overhead for
these small collections. Drop the <map> include.
2026-02-16 19:05:44 -06:00
J. Nick Koston
2b21c0a2b2 [http_request] Rename response_headers param to collect_headers in host
Align with IDF and Arduino implementations where the parameter is
named collect_headers.
2026-02-16 18:59:40 -06:00
J. Nick Koston
0c5d3ad77a [http_request] Rename response_headers param to collect_headers in host
Align with IDF and Arduino implementations where the parameter is
named collect_headers.
2026-02-16 18:59:20 -06:00
J. Nick Koston
b2b5bf0996 Merge branch 'http_request_reduce_stl_overhead' into integration 2026-02-16 18:54:09 -06:00
J. Nick Koston
aa3ac552c8 [http_request] Restore descriptive variable name in start() 2026-02-16 18:48:32 -06:00
J. Nick Koston
2fa6c15fc1 [http_request] Remove unnecessary lowercase_headers template helper
The template only existed to share a loop between set and vector
iterators. Instead, have the deprecated set overload forward to
the vector overload, and inline the loop there.
2026-02-16 18:38:31 -06:00
J. Nick Koston
7726d0aac9 [http_request] Rename should_collect_header param to lower_header_name
Makes it clear the caller must pass an already-lowercased header name.
2026-02-16 18:37:08 -06:00
J. Nick Koston
f43ef21c69 [http_request] Remove redundant lowercasing from add_collect_header
start() already lowercases all collect_headers via lowercase_headers(),
so pre-lowercasing at insertion time was redundant double work on
every request.
2026-02-16 18:34:41 -06:00
J. Nick Koston
d2037aef8d [http_request] Extract lowercase_headers helper to avoid double-copy
Both start() overloads now use a shared lowercase_headers() template
that does a single pass from any iterator range, avoiding the extra
vector copy that the set overload was doing.
2026-02-16 18:28:04 -06:00
J. Nick Koston
a55abd8e5f [http_request] Deduplicate lowercasing in start() overloads
Have the deprecated std::set overload forward to the vector overload
which already handles lowercasing.
2026-02-16 18:26:12 -06:00
J. Nick Koston
7c36dfa1fc [http_request] Ensure start() vector overload lowercases collect_headers
The vector overload of start() was passing collect_headers directly
to perform() without lowercasing. This meant callers using get()/post()
with mixed-case header names (e.g. {"ETag"}) would fail to match
against the lowercased header names from the HTTP response.
2026-02-16 18:24:41 -06:00
Jesse Hills
5904808804 Bump version to 2026.2.0b3 2026-02-17 13:24:35 +13:00
Jonathan Swoboda
e945e9b659 [esp32_rmt] Handle ESP32 variants without RMT hardware (#14001)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 13:24:35 +13:00
Jonathan Swoboda
df29cdbf17 [fan] Fix preset_mode not restored on boot (#14002)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 13:24:35 +13:00
Jonathan Swoboda
f6362aa8da [combination] Fix 'coeffecient' typo with backward-compatible deprecation (#14004)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 13:24:35 +13:00
J. Nick Koston
1517b7799a [wifi] Fix ESP8266 DHCP state corruption from premature dhcp_renew() (#13983)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 13:24:35 +13:00
J. Nick Koston
5e7b4c1e6c [http_request] Add comment explaining why start() calls perform() directly
The no-collect-headers start() overload calls perform() directly
instead of the vector start() overload to avoid ambiguity with
the deprecated std::set overload.
2026-02-16 18:17:53 -06:00
J. Nick Koston
3043ba8d89 [http_request] Deprecate std::set overloads of start(), use std::vector for get()/post()
- Change get()/post() collect_headers param from std::set to std::vector
  (initializer list callers like online_image work unchanged)
- Add ESPDEPRECATED on start() std::set overload with clear message
  about the collect_headers parameter
2026-02-16 18:17:11 -06:00
J. Nick Koston
8120bd373c [http_request] Replace std::map/std::set/std::list with std::vector for response headers
Replace heavy STL containers with simple std::vector and linear scan
for response header collection. This eliminates red-black tree (_Rb_tree)
and hash table template instantiations that are unnecessary for the small
number of headers typically collected (1-5 elements).

Changes:
- response_headers_: std::map<string, list<string>> -> std::vector<Header>
- collect_headers_: std::set<string> -> std::vector<string>
- perform() signature: std::set -> std::vector
- Add should_collect_header() inline helper for linear scan
- Lowercase collect_headers at config/insertion time instead of per-request
- IDF UserData now holds references to container's vector instead of
  owning a separate map that gets moved after the request
- Reuse existing Header struct instead of std::pair

Reduces stack usage in perform() and eliminates STL container overhead
on memory-constrained ESP devices.
2026-02-16 18:11:58 -06:00
J. Nick Koston
63bf03c467 Merge branch 'api-proto-write-presized-buffer' into integration 2026-02-16 16:09:01 -06:00
J. Nick Koston
5aef550c71 address copilot revie wcomments 2026-02-16 16:05:54 -06:00
J. Nick Koston
9d387b66db address copilot revie wcomments 2026-02-16 16:03:35 -06:00
J. Nick Koston
61c4288097 [api] Address review: comment noinline, simplify non-debug signature 2026-02-16 15:27:11 -06:00