Commit Graph

22210 Commits

Author SHA1 Message Date
J. Nick Koston
0e8d4da3fe Merge branch 'api-server-extract-accept' into integration 2026-02-10 12:51:36 -06:00
J. Nick Koston
419ea723b8 Merge remote-tracking branch 'upstream/dev' into api-server-extract-accept
# Conflicts:
#	esphome/components/api/api_server.cpp
2026-02-10 12:49:40 -06:00
J. Nick Koston
2585779f11 [api] Remove duplicate peername storage to save RAM (#13540) 2026-02-11 07:23:16 +13:00
J. Nick Koston
7f88191856 Merge remote-tracking branch 'upstream/dev' into integration 2026-02-10 11:52:34 -06:00
Jonathan Swoboda
b8ec3aab1d [ci] Pin ESP-IDF version for Arduino framework builds (#13909)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 12:16:25 -05:00
Jonathan Swoboda
c4b109eebd [esp32_rmt_led_strip, remote_receiver, pulse_counter] Replace hardcoded clock frequencies with runtime queries (#13908)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 17:09:56 +00:00
Jonathan Swoboda
03b41855f5 [esp32_hosted] Bump esp_wifi_remote and esp_hosted versions (#13911)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 16:03:26 +00:00
J. Nick Koston
458939df07 Merge remote-tracking branch 'origin/dev' into integration 2026-02-10 09:17:12 -06:00
Jonathan Swoboda
13a124c86d [pulse_counter] Migrate from legacy PCNT API to new ESP-IDF 5.x API (#13904)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 10:10:27 -05:00
Kevin Ahrendt
298efb5340 [resampler] Refactor for stability and to support Sendspin (#12254)
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2026-02-10 09:56:31 -05:00
J. Nick Koston
d4ccc64dc0 [http_request] Fix IDF chunked response completion detection (#13886) 2026-02-10 08:55:59 -06:00
J. Nick Koston
402cf1eb43 Merge branch 'optimize_batching' into integration 2026-02-10 07:26:04 -06:00
J. Nick Koston
a932ea343d [api] Split process_batch_ to reduce stack on single-message hot path
Clamp buffer pre-allocation to MAX_BATCH_PACKET_SIZE.
2026-02-10 07:23:22 -06:00
J. Nick Koston
6f4a26083f Merge branch 'optimize_batching' into integration 2026-02-10 07:11:06 -06:00
J. Nick Koston
937715c91c [api] Split process_batch_ to reduce stack on single-message hot path
Clamp buffer pre-allocation to MAX_BATCH_PACKET_SIZE.
2026-02-10 07:09:45 -06:00
J. Nick Koston
7f0b86a5cc Merge branch 'optimize_batching' into integration 2026-02-10 06:51:54 -06:00
J. Nick Koston
bab8d1e8b2 optimize batching 2026-02-10 06:50:13 -06:00
tronikos
e3141211c3 [water_heater] Add On/Off and Away mode support to template platform (#13839)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2026-02-10 12:45:18 +00:00
J. Nick Koston
aed45d15f0 Merge remote-tracking branch 'upstream/dev' into integration 2026-02-10 06:25:09 -06:00
J. Nick Koston
75c952eaef Merge branch 'template_water_heater_onoff' into integration 2026-02-10 06:21:45 -06:00
J. Nick Koston
1b3f3c04b9 Use mutable globals in water heater test fixture
Use globals for away/is_on lambdas and sync them in set_action
so optimistic state changes persist across loop iterations.
2026-02-10 06:17:52 -06:00
J. Nick Koston
6410c6cf9b improve tests 2026-02-10 06:14:41 -06:00
J. Nick Koston
0503760af4 Add integration tests for toggling away and on/off state flags 2026-02-10 06:09:18 -06:00
J. Nick Koston
820afea83a Fix publish action skipping away: false and is_on: false
The walrus operator treats false as falsy, so publishing
away: false or is_on: false was silently ignored. Use key
presence check instead.
2026-02-10 06:06:54 -06:00
dependabot[bot]
e85a022c77 Bump esphome-dashboard from 20260110.0 to 20260210.0 (#13905)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 11:49:59 +00:00
J. Nick Koston
22b038f6a4 Import WaterHeaterFeature from aioesphomeapi instead of redefining locally 2026-02-10 05:47:46 -06:00
J. Nick Koston
3410ee2420 Merge branch 'dev' into template_water_heater_onoff 2026-02-10 05:46:27 -06:00
dependabot[bot]
1c3af30299 Bump aioesphomeapi from 43.14.0 to 44.0.0 (#13906)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 11:45:31 +00:00
J. Nick Koston
50aaea6bf1 Merge branch 'dev' into template_water_heater_onoff 2026-02-10 05:38:01 -06:00
tronikos
5caed68cd9 [api] Deprecate WATER_HEATER_COMMAND_HAS_STATE (#13892)
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2026-02-10 05:36:56 -06:00
Cody Cutrer
b97a728cf1 [ld2450] add on_data callback (#13601)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-09 22:40:44 -05:00
J. Nick Koston
828fa3c408 Merge branch 'ble-loop-extract-transitions' into integration 2026-02-09 20:59:24 -06:00
J. Nick Koston
fca26ce944 [esp32_ble] Extract state transitions from ESP32BLE::loop() hot path 2026-02-09 20:57:36 -06:00
J. Nick Koston
b22290b2bb Merge branch 'api-server-extract-accept' into integration 2026-02-09 20:43:45 -06:00
J. Nick Koston
a671f6ea85 Use if/else instead of continue in client loop 2026-02-09 20:42:25 -06:00
J. Nick Koston
0c62781539 Extract remove_client_() from APIServer::loop() hot path 2026-02-09 20:42:09 -06:00
J. Nick Koston
7b3ab7f7f0 Merge branch 'api-server-extract-accept' into integration 2026-02-09 20:35:24 -06:00
J. Nick Koston
e6c743ea67 [api] Extract accept_new_connections_() from APIServer::loop() hot path 2026-02-09 20:34:11 -06:00
J. Nick Koston
94684cdc0b Revert early returns in process_active_iterator_()
The if/else pattern produces smaller code than early returns.
2026-02-09 20:20:33 -06:00
J. Nick Koston
5c8f1a180b Merge branch 'api-dedup-iterator-batch' into integration 2026-02-09 20:17:54 -06:00
J. Nick Koston
c53baf70c7 Collapse else chain in process_active_iterator_() with early returns 2026-02-09 20:16:09 -06:00
J. Nick Koston
041c43fb32 Add INITIAL_STATE comment to else branch 2026-02-09 20:14:54 -06:00
J. Nick Koston
b4741ade0d Remove unreachable NONE case from process_active_iterator_() 2026-02-09 20:13:57 -06:00
J. Nick Koston
2c3a92db97 Add forward declaration for ComponentIterator in api_connection.h 2026-02-09 20:11:45 -06:00
J. Nick Koston
fc91a4d7a3 Extract iterator switch from loop() into process_active_iterator_()
The iterator switch only runs during initial connection handshake.
In steady state active_iterator_ is always NONE, so the entire
switch block is cold code that wastes icache in the hot loop path.
2026-02-09 20:10:44 -06:00
J. Nick Koston
eb26b5d45c Merge branch 'api-dedup-iterator-batch' into integration 2026-02-09 20:02:32 -06:00
J. Nick Koston
842e0a9073 Merge branch 'app-loop-extract-dump-config' into integration 2026-02-09 20:02:27 -06:00
J. Nick Koston
8f367571f8 Add precondition comment to process_dump_config_() 2026-02-09 20:01:43 -06:00
J. Nick Koston
9bf90eff01 [api] De-duplicate iterator batch processing in APIConnection::loop()
Replace the process_iterator_batch_ template (instantiated separately
for ListEntitiesIterator and InitialStateIterator) with a single
non-template method taking a ComponentIterator& base class reference.

Both iterators inherit from ComponentIterator, and the template only
called completed() and advance() which are both base class methods.
The two template instantiations generated ~160 bytes of duplicate code
in APIConnection::loop(). The single non-template version is 79 bytes,
saving 61 bytes net flash and removing 140 bytes of cold
connect/reconnect code from the hot loop path.

Also move the duplicated completed() method from ListEntitiesIterator
and InitialStateIterator to the ComponentIterator base class where
state_ is defined.
2026-02-09 19:57:29 -06:00
J. Nick Koston
1213774168 [core] Extract dump_config from Application::loop() hot path
Extract the dump_config block (version/chip info logging + per-component
dump_config iteration) into a separate noinline process_dump_config_()
method.

This code runs once at startup and once on API reconnect, but was
inlined into loop() which runs ~7000 times/minute. On ESP32 the
dump_config block compiled to ~140 bytes (38% of loop's 368 bytes),
including esp_chip_info(), integer division for revision formatting,
and multiple ESP_LOG calls. Extracting it frees ~2 icache lines for
the hot path.
2026-02-09 19:43:25 -06:00