Commit Graph
25696 Commits
Author SHA1 Message Date
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
J. Nick Koston d7e0d5af63 Merge branch 'dev' into api/peel-first-write-iteration 2026-03-23 08:57:13 -10:00
J. Nick Koston 9da0c5bc85 [wifi] Fix roaming attempt counter reset on disconnect during scan (#15099) 2026-03-23 08:47:15 -10:00
J. Nick Koston 4b0c711f77 [ci] Ban std::bind in new C++ code (#14969) 2026-03-23 08:23:35 -10:00
J. Nick Koston 9385f16128 [text_sensor] Guard raw_callback_ behind USE_TEXT_SENSOR_FILTER, save 4 bytes per instance (#15097) 2026-03-23 08:23:22 -10:00
J. Nick Koston 36d2e58b11 [api] Make ProtoDecodableMessage::decode() non-virtual (#15076) 2026-03-23 08:23:08 -10:00
J. Nick Koston 03d6b36fe0 [gpio] Compile out interlock fields when unused (#15111) 2026-03-23 08:22:38 -10:00
J. Nick Koston 3b5b51b4f0 [time] Point to valid IANA timezone list on validation failure (#15110) 2026-03-23 08:22:25 -10:00
Clyde Stubbs e8c5dfca3e [lvgl] Various fixes (#15098) 2026-03-23 12:09:30 -04:00
Kevin Ahrendt 5a984b54cf [audio] Bump microOpus to avoid creating an extra opus-staged directory (#14974) 2026-03-23 08:31:05 -04:00
J. Nick Koston 08a63950ac Address review: use stored interrupt_type_ in setup(), update comment 2026-03-23 01:46:31 -10:00
J. Nick Koston b3b8bd11da Merge branch 'dev' into gpio-binary-sensor-field-packing 2026-03-23 01:42:47 -10:00
J. Nick Koston 410142eb5a Merge branch 'gpio-binary-sensor-field-packing' into integration 2026-03-23 01:42:15 -10:00
J. Nick Koston 00d34e9fe8 [gpio] Remove redundant last_state_ and pack GPIOBinarySensor fields
Remove last_state_ from GPIOBinarySensorStore — it was always set to
the same value as state_ in the ISR and never written elsewhere, making
the comparison `new_state != last_state_` equivalent to
`new_state != state_`.

Move use_interrupt_ and interrupt_type_ into the store to fill the
padding freed by removing last_state_, eliminating all internal padding.

Store layout (12B, zero padding):
  isr_pin_.arg_*   4B
  component_*      4B
  state_           1B (volatile)
  changed_         1B (volatile)
  use_interrupt_   1B
  interrupt_type_  1B

Saves 4 bytes per GPIOBinarySensor instance (64B → 60B).
2026-03-23 01:35:24 -10:00
J. Nick Koston f3e0d7fab0 Merge branch 'light-state-field-alignment' into integration 2026-03-23 01:19:16 -10:00
J. Nick Koston c1b2b110c5 Use brace initialization for is_transformer_active_ 2026-03-23 01:17:27 -10:00
J. Nick Koston ffd3bb760e [light] Reorder LightState fields to eliminate padding
Move restore_mode_ (uint8_t) next to next_write_ and
is_transformer_active_ (both bool) so all three pack into
a single 4-byte slot. Previously restore_mode_ sat alone
at the end of the struct with 3 bytes of trailing padding.

Saves 4 bytes per LightState instance.
2026-03-23 01:16:36 -10:00
J. Nick Koston d5a4c06162 Merge branch 'compile-out-gpio-switch-interlock' into integration 2026-03-23 01:09:55 -10:00
J. Nick Koston 574009c6be [gpio] Compile out interlock fields when unused
Save 16 bytes per GPIOSwitch instance (FixedVector<Switch*> 12B +
uint32_t 4B) by guarding interlock fields and logic behind
USE_GPIO_SWITCH_INTERLOCK, which is only defined when the interlock
config option is present.
2026-03-23 01:08:21 -10:00
J. Nick Koston 5822640d2f Merge remote-tracking branch 'upstream/dev' into integration 2026-03-23 00:05:25 -10:00
Simone RossettoandJ. Nick Koston 43879964bd [wireguard] bump esp_wireguard to 0.4.4 for mbedtls 4.0+ compatibility (#15104)
Co-authored-by: J. Nick Koston <nick@koston.org>
2026-03-22 23:03:19 -10:00
J. Nick Koston 30049d6838 Merge remote-tracking branch 'upstream/ci-ban-std-bind' into integration 2026-03-22 21:40:05 -10:00
J. Nick Koston f744568689 Merge remote-tracking branch 'upstream/component-8byte-optimization' into integration 2026-03-22 21:40:00 -10:00
J. Nick Koston bd7bdc0e2d Merge remote-tracking branch 'upstream/devirtualize-decode' into integration 2026-03-22 21:39:51 -10:00
J. Nick Koston 010d7699f2 Use walrus operator in _generate_component_source_table 2026-03-22 21:30:42 -10:00
J. Nick Koston 099bea00f6 Add test for _generate_source_table_code empty input 2026-03-22 21:30:22 -10:00
J. Nick Koston 40f9d09828 Merge branch 'dev' into ci-ban-std-bind 2026-03-22 21:27:45 -10:00
J. Nick Koston ebb11206e3 Fix stale comment on component_source_index_ field 2026-03-22 21:25:24 -10:00
J. Nick Koston a92281f899 Add tests for register_component_source, remove redundant index check
- Test empty name returns 0
- Test deduplication returns same index
- Test overflow warns and returns 0
- Remove duplicate index==0 check in get_component_log_str() since
  component_source_lookup() already handles it
2026-03-22 21:24:13 -10:00
J. Nick Koston d755922aae Merge remote-tracking branch 'upstream/dev' into devirtualize-decode 2026-03-22 21:18:09 -10:00