Commit Graph
25726 Commits
Author SHA1 Message Date
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
J. Nick Koston ea37542b41 [wifi] Track roam target BSSID to detect successful roam via retry
When a roam connection fails on the first attempt, retry_connect()
transitions to RECONNECTING. The subsequent scan-based retry may
connect to the same better AP, but the success handler treated all
RECONNECTING connections as failed roams and preserved the attempts
counter. This meant a successful roam (that needed two tries) would
incorrectly consume an attempt.

Fix by storing the roam target BSSID and checking it on reconnection.
If the device connected to the intended target, reset the counter
(successful roam). If it fell back to a different AP, preserve the
counter (failed roam, prevent ping-pong).
2026-03-23 13:05:15 -10:00
Clyde Stubbs e6a73cab8f [number] Add sensor platform (#15125) 2026-03-24 12:04:53 +13:00
bf6000ef3d [substitutions] substitutions pass and !include redesign (package refactor part 2b) (#14918)
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
Co-authored-by: J. Nick Koston <nick@koston.org>
2026-03-23 12:50:28 -10:00
J. Nick Koston 96fe1b57c3 Merge remote-tracking branch 'upstream/fix-roaming-grace-period' into integration 2026-03-23 12:46:21 -10:00
J. Nick Koston c7900d1958 Merge remote-tracking branch 'upstream/wifi-esp8266-roam-scan-dwell' into integration 2026-03-23 12:46:09 -10:00
J. Nick Koston 04032914e9 Merge remote-tracking branch 'upstream/dev' into integration
# Conflicts:
#	esphome/components/ethernet/__init__.py
#	esphome/components/ethernet/ethernet_component_esp32.cpp
2026-03-23 12:45:25 -10:00
J. Nick Koston e140092569 [wifi] Use shorter scan dwell time for ESP8266 roaming scans
Use 100-300ms dwell times for roaming scans instead of 400-500ms,
matching the ESP32 IDF scan times. This reduces total off-channel
time from ~6.5s to ~3.9s (13 channels), which reduces the chance
of triggering Beacon Timeout disconnects on aggressive APs.

The longer dwell times are preserved for initial connection scans
where a thorough survey is needed.
2026-03-23 12:40:27 -10:00
J. Nick Koston 96657f71a2 [wifi] Fix roaming counter reset from delayed disconnect after scan
On ESP8266, the roaming scan goes off-channel for ~3 seconds. Some
APs aggressively disconnect the client (Beacon Timeout) 8-20 seconds
after the scan finishes. By that time, process_roaming_scan_() has
already set roaming_state_ back to IDLE. When retry_connect() runs,
it sees IDLE and calls clear_roaming_state_(), resetting the attempts
counter to 0. This creates an infinite loop of "attempt 1/3" every
5 minutes.

The aggressive AP behavior cannot be fixed from the ESP side, but we
can prevent the counter from resetting so roaming eventually stops
after 3 attempts.

Fix by recording when the roaming scan completes and adding a 30s
grace period. If a disconnect occurs within that window, the state
transitions to RECONNECTING (preserving the counter) instead of
clearing it.

Closes https://github.com/esphome/esphome/issues/15124
2026-03-23 12:34:56 -10:00
J. Nick Koston 9e645c72aa Merge branch 'api/peel-first-write-iteration' into integration 2026-03-23 12:01:59 -10:00
J. Nick Koston 5ccb246e3b Merge remote-tracking branch 'upstream/gpio-binary-sensor-field-packing' into integration 2026-03-23 12:01:49 -10:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 332118db56 Bump pytest-cov from 7.0.0 to 7.1.0 (#15123)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-23 11:44:26 -10:00
Clyde Stubbs 6956bf7e53 [text] Add text_sensor for read-only view of text component (#15090) 2026-03-24 10:24:25 +13:00
Daniel KentandJonathan Swoboda 11b829dda1 [spa06_spi] Add SPA06-003 Temperature and Pressure Sensor - SPI support (Part 3 of 3) (#14523)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2026-03-23 15:59:17 -04:00
J. Nick Koston 1e16b30380 [ethernet] Add ENC28J60 SPI Ethernet support (#14945) 2026-03-23 19:18:58 +00:00
Daniel Kent 4c1363b104 [spi] Add LOG_SPI_DEVICE macro (#15118) 2026-03-23 15:07:40 -04:00