Commit Graph

25222 Commits

Author SHA1 Message Date
J. Nick Koston 455a33cdb5 Merge remote-tracking branch 'upstream/binary-sensor-multiclick-inline-callback' into integration 2026-03-19 00:42:18 -10:00
J. Nick Koston 3bc7efb479 [binary_sensor] Replace std::bind with inline lambda in MultiClickTrigger
Replace std::bind(&MultiClickTrigger::on_state_, this, _1) with a
[this] lambda for the add_on_state_callback registration. The [this]
lambda fits within the Callback inline storage threshold
(sizeof(void*)), avoiding a permanent heap allocation.
2026-03-19 00:04:55 -10:00
J. Nick Koston e5ab35e144 Merge remote-tracking branch 'upstream/fix-top-level-iana-tz' into integration 2026-03-18 23:45:39 -10:00
J. Nick Koston b5b84c1570 Merge remote-tracking branch 'upstream/packet-transport-inline-callback' into integration 2026-03-18 23:45:34 -10:00
J. Nick Koston ed51f2869b Merge remote-tracking branch 'upstream/combination-inline-callback' into integration 2026-03-18 23:45:30 -10:00
J. Nick Koston f8af05bbea Merge remote-tracking branch 'upstream/dev' into integration 2026-03-18 23:22:56 -10:00
Javier Peletier 0a3393bed3 [core] Disable LeakSanitizer in C++ unit tests (#14712) 2026-03-18 23:13:36 -10:00
Javier Peletier c2c50ceea7 [substitutions] substitutions pass and !include redesign (package refactor part 2a) (#14917)
Co-authored-by: J. Nick Koston <nick@koston.org>
2026-03-18 23:10:01 -10:00
J. Nick Koston 07b6c7dd5b [time] Fix lookup of top-level IANA timezone keys like UTC and GMT 2026-03-18 22:55:17 -10:00
J. Nick Koston 9a3798ad2a [packet_transport] Fix tests to call set_sensor_count before add_sensor
FixedVector requires init() before push_back(). Update all test cases
to call set_sensor_count()/set_binary_sensor_count() before adding
sensors, matching what the Python codegen does.
2026-03-18 21:46:41 -10:00
J. Nick Koston 257d804d06 [packet_transport] Use const ref in dump_config loops to avoid copies 2026-03-18 21:34:06 -10:00
Clyde Stubbs 2341d510d3 [lvgl] Migrate to library v9.5.0 (#12312)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2026-03-19 20:31:33 +13:00
J. Nick Koston c1a843a9af [packet_transport] Remove unnecessary friend declarations
The lambdas are defined inside PacketTransport::setup() so they
inherit member-function access rights. The friend declarations
are not needed for accessing protected members through parent pointer.
2026-03-18 21:30:50 -10:00
J. Nick Koston ad668f6395 [packet_transport] Use FixedVector for sensor lists to eliminate realloc machinery
The sensor and binary sensor counts are known at config time, so
pre-allocate with FixedVector::init() instead of using std::vector
which pulls in _M_realloc_insert template instantiation code.
2026-03-18 21:29:02 -10:00
J. Nick Koston 96f4f1537c [packet_transport] Add safety comments for [&sensor] capture lifetime 2026-03-18 21:26:42 -10:00
J. Nick Koston 084790809f [combination] Add safety comment for [&source] capture lifetime 2026-03-18 21:26:20 -10:00
J. Nick Koston ded490dc9f [combination] Move SensorSource to protected and fix grammar nit 2026-03-18 21:24:09 -10:00
J. Nick Koston 04552e240e [combination] Use FixedVector for sensor sources to eliminate realloc machinery
The source count is known at config time, so pre-allocate with
FixedVector::init() instead of using std::vector which pulls in
_M_realloc_insert template instantiation code.
2026-03-18 21:19:22 -10:00
J. Nick Koston 5b8acaa7c0 [combination] Store parent pointer to enable inline Callback storage
Replace std::pair<Sensor*, std::function> with a SensorSource struct
that includes a back-pointer to the parent component. This allows
KalmanCombinationComponent::setup() to capture only [&source] (one
pointer) instead of [this, stddev] (this + a full std::function copy),
enabling inline Callback storage and avoiding a heap allocation per
sensor callback registration.
2026-03-18 20:05:49 -10:00
J. Nick Koston 7b9d3b4c33 [packet_transport] Store parent pointer to enable inline Callback storage
Add a back-pointer to PacketTransport in the Sensor and BinarySensor
structs so the state callback lambdas can capture only [&sensor] (one
pointer) instead of [this, &sensor] (two pointers). This brings the
capture size within the Callback inline threshold (sizeof(void*)),
avoiding a heap allocation per callback registration.
2026-03-18 19:59:24 -10:00
Kevin Ahrendt 9d6f2f71e8 [speaker_source] Reshuffle playlist on repeat all restart (#14773)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-18 19:51:17 -10:00
Nate Clark e1334cf57f [mqtt] Support JSON payload with code for alarm control panel commands (#14731)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
Co-authored-by: J. Nick Koston <nick@koston.org>
2026-03-19 05:40:48 +00:00
J. Nick Koston f4db76d7e4 Merge remote-tracking branch 'upstream/callback-drop-captures' into integration 2026-03-18 19:36:06 -10:00
J. Nick Koston f757e7e7d4 Merge remote-tracking branch 'upstream/add-enc28j60-ethernet' into integration 2026-03-18 19:35:59 -10:00
J. Nick Koston 0f6eac0d57 Merge branch 'dev' into callback-drop-captures 2026-03-18 18:43:45 -10:00
J. Nick Koston a1aff7cadf [preferences] Devirtualize preference backend and manager classes (#14825) 2026-03-18 18:42:05 -10:00
J. Nick Koston 2271ac6470 [api] Extract overflow buffer from frame helper into APIOverflowBuffer (#14871) 2026-03-18 18:41:45 -10:00
J. Nick Koston 8fe36cde23 [core] Replace std::function with lightweight Callback in CallbackManager (#14853) 2026-03-18 18:41:05 -10:00
Jesse Hills fdd5956c1e Merge branch 'release' into dev 2026-03-19 17:34:17 +13:00
Jesse Hills 609003c897 Merge pull request #14941 from esphome/bump-2026.3.0
2026.3.0
2026.3.0
2026-03-19 17:33:27 +13:00
J. Nick Koston 3c1431c322 [ethernet] Address additional review feedback
- Remove dead ENC28J60 entry from _IDF6_ETHERNET_COMPONENTS
- Simplify get_duplex_mode() — both chips are full-duplex on RP2040
- Add #error guard for unsupported RP2040 SPI Ethernet type
2026-03-18 17:40:13 -10:00
J. Nick Koston e90839e0b8 [ethernet] Address additional review feedback
- Remove dead ENC28J60 entry from _IDF6_ETHERNET_COMPONENTS
- Simplify get_duplex_mode() — both chips are full-duplex on RP2040
- Add #error guard for unsupported RP2040 SPI Ethernet type
2026-03-18 17:39:50 -10:00
J. Nick Koston f83a2768b6 Merge remote-tracking branch 'upstream/add-enc28j60-ethernet' into integration 2026-03-18 17:32:38 -10:00
J. Nick Koston 82348af414 [ethernet] Address review feedback
- Remove redundant ENC28J60lwIP.h include (already included via header)
- Fix misleading duplex mode comment for ENC28J60
2026-03-18 17:31:38 -10:00
J. Nick Koston c752c023a4 [ethernet] Add ENC28J60 SPI Ethernet support for ESP32 and RP2040 2026-03-18 17:14:43 -10:00
J. Nick Koston a771431126 Merge branch 'inline-calculate-looping-components' into integration 2026-03-18 16:27:41 -10:00
J. Nick Koston bd91d4831e Merge remote-tracking branch 'upstream/preferences-compile-out-loop' into integration 2026-03-18 16:27:36 -10:00
J. Nick Koston da2f86bfab fix 2026-03-18 16:27:21 -10:00
J. Nick Koston 196586bd29 [core] Inline calculate_looping_components_ into header
Move calculate_looping_components_() from application.cpp to
application.h as an inline method. This function has only one
caller (setup()) and is small enough for the compiler to inline,
saving ~20 bytes of flash by eliminating the function call overhead.
2026-03-18 16:25:20 -10:00
J. Nick Koston b08f730aeb Merge remote-tracking branch 'upstream/preferences-compile-out-loop' into integration 2026-03-18 16:10:35 -10:00
J. Nick Koston 0594e22e3a [preferences] Compile out loop() when flash_write_interval is non-zero
The write_interval == 0 case (sync every loop) is only used on host
or for testing. For the vast majority of real devices using the default
60s interval, loop() and the runtime branch are unnecessary overhead.

Use a compile-time define to separate the two modes so that:
- Normal case: no loop() override, no write_interval_ member, just set_interval
- Zero interval case: loop() syncs every iteration, no interval needed
2026-03-18 16:08:24 -10:00
J. Nick Koston 99042463d0 Merge remote-tracking branch 'upstream/inline-get-use-address' into integration 2026-03-18 15:51:18 -10:00
J. Nick Koston 0f9158d37b [network] Inline get_use_address() to eliminate function call overhead
Move get_use_address()/set_use_address() definitions to headers for
wifi, ethernet, and openthread components so the compiler can inline
them. Also inline network::get_use_address() in the header, matching
the existing pattern used by network::is_connected().

This allows the compiler to collapse the two-level indirection
(network::get_use_address -> component->get_use_address -> field load)
into a single pointer dereference at each call site.

Saves 24 bytes of flash on ESP32-S3.
2026-03-18 15:50:38 -10:00
Jonathan Swoboda 403ba262c6 [openthread] Guard InstanceLock against uninitialized semaphore (#14940)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 21:23:47 -04:00
J. Nick Koston 5ffe824fff Merge remote-tracking branch 'upstream/dev' into integration 2026-03-18 14:13:41 -10:00
Jonathan Swoboda f8be27ce6d [ble_client] Fix RSSI sensor reporting same value for all clients (#14939)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 20:10:42 -04:00
Jesse Hills 2c10adba85 Bump version to 2026.3.0 2026-03-19 13:09:03 +13:00
J. Nick Koston a50d70c8d3 [core] Remove call_loop_ wrapper and call loop() directly (#14931) 2026-03-18 14:08:03 -10:00
J. Nick Koston 4d86049c21 [ota] Pack deferred state args into uint32 to avoid heap allocation (#14922)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-18 14:06:55 -10:00
J. Nick Koston 44037c4f9b [http_request] Prevent double update task launch (#14910) 2026-03-18 14:06:41 -10:00