Commit Graph
26515 Commits
Author SHA1 Message Date
J. Nick Koston 9fb5b6aa15 [light] Replace initial_state storage with flash-resident callback (#15133) 2026-03-24 14:03:18 -10:00
J. Nick Koston 752fe30332 [api] Add descriptive message to status warning when waiting for client (#15148) 2026-03-24 20:01:59 -04:00
Jonathan SwobodaandJ. Nick Koston 4ff85e2a1e [core] Fix clean-all to handle custom build paths (#15146)
Co-authored-by: J. Nick Koston <nick+github@koston.org>
2026-03-24 19:48:17 -04:00
J. Nick Koston cf961d7e11 Merge remote-tracking branch 'upstream/logger-task-log-buffer-bss' into integration 2026-03-24 13:26:07 -10:00
J. Nick Koston a4225eb4e9 Fix sizeof(non-static member) in static function 2026-03-24 13:24:47 -10:00
J. Nick Koston f7c9a70d89 Merge remote-tracking branch 'origin/logger-task-log-buffer-bss' into integration 2026-03-24 13:19:44 -10:00
J. Nick Koston 42a8a7946e Fix test Logger constructor calls 2026-03-24 13:12:40 -10:00
J. Nick Koston 32151bfc43 Address review feedback
- Remove dead DEFAULT_SLOT_COUNT constant from host header
- Fix misleading BSS comments (Logger is heap-allocated via new_Pvariable)
- Add comment explaining Zephyr BUF_WORD_COUNT formula
2026-03-24 13:11:38 -10:00
J. Nick Koston 99d0aa9734 Fix dummy_main.cpp Logger constructor call 2026-03-24 13:10:10 -10:00
J. Nick Koston 4d379d5e10 [logger] Move task log buffer storage to BSS
Follow-up to #15071 which moved the TaskLogBuffer allocation into the
Logger constructor to fix a race condition where another task could log
before the buffer was initialized.

This takes that fix further by eliminating the heap allocation entirely.
The buffer size is a codegen constant, so we emit it as a define
(ESPHOME_TASK_LOG_BUFFER_SIZE) and use it to size member arrays directly.
The TaskLogBuffer becomes a direct member of Logger rather than a
heap-allocated pointer, placing the entire buffer in BSS.

Changes per platform:
- ESP32: storage_ from RAMAllocator heap to member array
- Host: slots_ from unique_ptr<LogMessage[]> to member array
- LibreTiny: storage_ from RAMAllocator heap to member array
- Zephyr: mpsc buf from new uint32_t[] to member array
2026-03-24 13:07:40 -10:00
J. Nick Koston 434e548a22 Merge remote-tracking branch 'upstream/dev' into integration 2026-03-24 10:40:48 -10:00
13baf26050 [core] get_log_str: fix false-positive error on null-terminated strings with stricter compilers (#15136)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick+github@koston.org>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2026-03-24 20:26:21 +00:00
J. Nick Koston 968fa1cadd Merge remote-tracking branch 'origin/api-warning-message' into integration 2026-03-24 10:19:55 -10:00
J. Nick Koston 17981a14af [api] Add descriptive message to status warning when waiting for client
The API component calls status_set_warning() without a message when no
client is connected and reboot timeout is enabled. This results in a
confusing log line: "api set Warning flag: unspecified"

Replace with a descriptive message so users see:
"api set Warning flag: waiting for client connection"

Closes https://github.com/esphome/esphome/issues/15140
2026-03-24 10:18:17 -10:00
Jonathan Swoboda 8751f348c8 [sx127x] Fix FIFO read corruption (#15114) 2026-03-24 10:04:27 -10:00
Fabian Bläse 22bc47da23 [light] Fix incorrect mode change handling on transition to off (#15147) 2026-03-24 19:57:58 +00:00
Jonathan Swoboda 55df21db51 [esp32] Default CPU frequency to maximum supported (#15143) 2026-03-24 15:44:28 -04:00
J. Nick Koston 0cb9b682e6 Merge remote-tracking branch 'swoboda1337/cpu-freq-max' into integration 2026-03-24 09:31:46 -10:00
Jonathan Swoboda 3cd50f0495 [ci] Block new CONF_ constants from being added to esphome/const.py (#15145) 2026-03-24 09:31:08 -10:00
Diorcet Yann b3390d40fb [core] Fix cg.add_define propagation to dependencies in native ESP-IDF builds (#15137) 2026-03-24 14:31:42 -04:00
Jonathan Swoboda 1165043ca1 [esp32] Default CPU frequency to maximum supported 2026-03-24 13:03:14 -04:00
Javier PeletierandJ. Nick Koston 7eddf429ea [substitutions] speed up config loading: substitutions pass and !include redesign (package refactor part 4) (#12126)
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2026-03-23 23:57:22 -10: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