Commit Graph
25741 Commits
Author SHA1 Message Date
J. Nick Koston 0cb9b682e6 Merge remote-tracking branch 'swoboda1337/cpu-freq-max' into integration 2026-03-24 09:31:46 -10:00
Jonathan Swoboda 1165043ca1 [esp32] Default CPU frequency to maximum supported 2026-03-24 13:03:14 -04:00
J. Nick Koston 24a1571d2b Merge remote-tracking branch 'upstream/ifaction-constexpr-else' into integration 2026-03-23 21:43:01 -10:00
J. Nick Koston 4cab4c348a Use plain bool instead of RawExpression for IfAction template arg 2026-03-23 21:38:33 -10:00
J. Nick Koston 130a01fd0a [core] Use compile-time HasElse parameter in IfAction to save 8 bytes per instance
IfAction now takes a bool HasElse template parameter. When false (the
common case — most if actions have no else branch), the else_ ActionList
is replaced by an empty struct with [[no_unique_address]], saving 8
bytes per instance.

The codegen already knows at generation time whether an else branch
exists and passes the appropriate template argument.
2026-03-23 21:35:30 -10:00
J. Nick Koston 1024569318 Merge remote-tracking branch 'upstream/light-initial-state-callback' into integration 2026-03-23 21:28:34 -10:00
J. Nick Koston 0bbc022311 Drop unnecessary COLOR_MODES lookup — codegen handles EStr correctly 2026-03-23 21:27:53 -10:00
J. Nick Koston 91b0b0dd70 Clarify color_mode lookup intent 2026-03-23 20:47:44 -10:00
J. Nick Koston d632f1070b Merge branch 'light-initial-state-callback' into integration 2026-03-23 20:43:51 -10:00
J. Nick Koston a53b0f4646 Add integration test for light initial_state 2026-03-23 20:40:56 -10:00
J. Nick Koston 0073d37bf9 [light] Replace initial_state storage with flash-resident callback
Replace the inline optional<LightStateRTCState> (~44 bytes) with a
function pointer callback (4 bytes) that populates the initial state
during setup. The callback is a stateless lambda whose values live in
flash as code, not in the LightState object.

Saves ~40 bytes per LightState instance unconditionally — the optional
reserved space for the struct even when initial_state was not configured
(the common case).
2026-03-23 20:36:55 -10:00
J. Nick Koston 8dc45d02e7 Merge branch 'integration' of https://github.com/esphome/esphome into integration 2026-03-23 20:05:18 -10:00
J. Nick Koston 7927b9d885 Merge remote-tracking branch 'upstream/light-control-action-compact' into integration 2026-03-23 20:04:54 -10:00
J. Nick Koston 04c6e7e770 [light] Use compact per-field union storage in LightControlAction
Replace 14 TemplatableValue fields with a per-field union that stores
either a constant value or a callable pointer in the same 4 bytes
(on 32-bit targets). A 2-bit-per-field type tag in a uint32_t tracks
field state (unset/constant/stateless lambda/stateful lambda).

Reduces LightControlAction from 128 to 76 bytes per instance on ESP32.
For a config with 8 light actions, this saves 416 bytes of RAM and
476 bytes of flash (from eliminated TemplatableValue template
instantiations).
2026-03-23 20:03:34 -10:00
J. Nick Koston b36a049761 Merge branch 'add-w5100-ethernet-support' into integration 2026-03-23 19:57:21 -10:00
J. Nick Koston 0ea2a3e5cc Merge remote-tracking branch 'upstream/light-control-action-compact' into integration 2026-03-23 19:49:04 -10:00
J. Nick Koston 57c8ab861e [light] Use compact per-field union storage in LightControlAction
Replace 14 TemplatableValue fields with a per-field union that stores
either a constant value or a callable pointer in the same 4 bytes
(on 32-bit targets). A 2-bit-per-field type tag in a uint32_t tracks
field state (unset/constant/stateless lambda/stateful lambda).

Reduces LightControlAction from 128 to 76 bytes per instance on ESP32.
For a config with 8 light actions, this saves 416 bytes of RAM and
476 bytes of flash (from eliminated TemplatableValue template
instantiations).
2026-03-23 19:48:44 -10:00
J. Nick Koston 5dd47c8de9 Merge branch 'add-w5100-ethernet-support' into integration 2026-03-23 18:34:35 -10:00
J. Nick Koston 5116a86c6f [ethernet] Address review comments 2026-03-23 18:34:05 -10:00
J. Nick Koston b3d75850a1 Merge remote-tracking branch 'upstream/add-w5100-ethernet-support' into integration 2026-03-23 18:30:16 -10:00
J. Nick Koston f2857554b8 [ethernet] Use compile-time check for W5100 link detection 2026-03-23 18:28:16 -10:00
J. Nick Koston 11ae5b2d71 [ethernet] Use compile-time check for W5100 link detection 2026-03-23 18:27:55 -10:00
J. Nick Koston 14ae11e0de Merge remote-tracking branch 'upstream/add-w5100-ethernet-support' into integration 2026-03-23 18:23:53 -10:00
J. Nick Koston 739bd93191 [ethernet] Add W5100 support for RP2040
Add support for the WIZnet W5100/W5100S SPI Ethernet controller
on RP2040 platforms, using the arduino-pico lwIP_w5100 library.

Tested on W5100S-EVB-Pico hardware.
2026-03-23 18:08:02 -10:00
J. Nick Koston 3fb2083415 Merge remote-tracking branch 'upstream/dev' into integration 2026-03-23 17:39:44 -10:00
J. Nick Koston 793813790a [api] Precompute tag bytes for forced varint and length-delimited fields (#15067) 2026-03-24 01:52:39 +00:00
J. Nick Koston 51de1ad0b9 Merge remote-tracking branch 'upstream/precompute-tag-forced-varint-fields' into integration
# Conflicts:
#	esphome/components/api/api_pb2_dump.cpp
#	esphome/components/sensor/sensor.h
2026-03-23 15:28:13 -10:00
J. Nick Koston f630173f13 Merge branch 'dev' into precompute-tag-forced-varint-fields 2026-03-23 15:21:23 -10:00
J. Nick KostonandJonathan Swoboda fe2c4e47bf [sensor] Deprecate .raw_state, guard raw_callback_ behind USE_SENSOR_FILTER (#15094)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2026-03-24 00:40:02 +00:00
Javier PeletierandJ. Nick Koston df4318505f [substitutions] refactor substitute() as a pure function (package refactor part 3) (#15031)
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2026-03-23 14:28:04 -10:00
J. Nick Koston 2ccfb3c358 Merge remote-tracking branch 'upstream/fix-roaming-grace-period' into integration 2026-03-23 14:08:10 -10:00
J. Nick Koston 9d92e14cb2 [wifi] Log roam check skipped at DEBUG level for visibility
The "Roam check skipped, signal good" message was at VERBOSE level,
making it invisible in normal logs. This made it unclear whether
roaming checks were happening after a successful roam. Promote to
DEBUG to match the "Roam scan" message level.
2026-03-23 14:07:48 -10:00
J. Nick Koston 69911c3db1 [wifi] Reduce ESP8266 roaming scan dwell time to match ESP32 (#15127) 2026-03-23 13:58:36 -10:00
J. Nick Koston 8ad8f89e50 [light] Reorder LightState fields to eliminate padding (#15112) 2026-03-23 13:56:53 -10:00
J. Nick Koston a3d9854704 [gpio] Remove redundant last_state_ and pack GPIOBinarySensor fields (#15113) 2026-03-23 13:56:36 -10:00
J. Nick Koston 613481e9e9 Merge branch 'dev' into precompute-tag-forced-varint-fields 2026-03-23 13:41:55 -10:00
J. Nick KostonandCopilot Autofix powered by AI 13d3968d9b [api] Avoid heap allocation in PSK update timeout lambda (#14921)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-23 13:41:09 -10:00
J. Nick Koston 382de7ca90 [api] Store dump strings in PROGMEM to save RAM on ESP8266 (#14982) 2026-03-23 13:40:53 -10:00
J. Nick Koston a0d0516b22 [benchmark] Add noise handshake benchmark (#15039) 2026-03-23 13:40:41 -10:00
J. Nick Koston 0fb31726f6 [esp32] Add sram1_as_iram option and bootloader version detection (#14874) 2026-03-23 13:39:29 -10:00
J. Nick Koston ae38db1147 Merge remote-tracking branch 'upstream/fix-roaming-grace-period' into integration 2026-03-23 13:27:52 -10:00
J. Nick Koston 95af5c233e [wifi] Distinguish failed roam vs scan-induced disconnect in log
Split the RECONNECTING log message into two cases:
- "Reconnected after failed roam" when a specific roam target was
  set but we ended up on a different AP
- "Reconnected after roam scan" when no roam target was set (the
  disconnect was caused by going off-channel during the scan itself)
2026-03-23 13:27:35 -10:00
J. Nick Koston 5573660485 Merge remote-tracking branch 'upstream/fix-roaming-grace-period' into integration 2026-03-23 13:18:11 -10:00
J. Nick Koston a74212b9a5 [wifi] Distinguish failed roam vs scan-induced disconnect in log
Split the RECONNECTING log message into two cases:
- "Reconnected after failed roam" when a specific roam target was
  set but we ended up on a different AP
- "Reconnected after roam scan" when no roam target was set (the
  disconnect was caused by going off-channel during the scan itself)
2026-03-23 13:17:50 -10:00
J. Nick Koston cf9b203e78 Merge remote-tracking branch 'upstream/fix-roaming-grace-period' into integration 2026-03-23 13:14:32 -10:00
J. Nick Koston e63105b023 Merge remote-tracking branch 'upstream/wifi-esp8266-roam-scan-dwell' into integration 2026-03-23 13:14:26 -10:00
J. Nick Koston 0a96a6626a Add _MS suffix to scan dwell time constants 2026-03-23 13:14:02 -10:00
J. Nick Koston 0814685af0 [wifi] Review fixes: clear grace period on reconnect, log BSSID, fix layout
- Clear roaming_scan_end_ on successful reconnect to prevent grace
  period from incorrectly applying to a second disconnect
- Log target BSSID in "Roam successful (via retry)" message
- Move bssid_t roaming_target_bssid_ to 1-byte section to avoid
  2 bytes struct padding before ap_timeout_
2026-03-23 13:11:42 -10:00
J. Nick Koston b357758369 [wifi] Fix use-after-free: read target BSSID before releasing scan results
best is a pointer into scan_result_. Move roaming_target_bssid_
assignment before release_scan_results_() to avoid dangling pointer.
2026-03-23 13:09:37 -10:00
J. Nick Koston a64cdd644f Merge branch 'dev' into wifi-esp8266-roam-scan-dwell 2026-03-23 13:06:22 -10:00