Commit Graph
27061 Commits
Author SHA1 Message Date
J. Nick Koston b66fce67dc Merge branch 'fix-api-batch-nodelay' into integration 2026-04-08 10:38:14 -10:00
J. Nick Koston 58100f2720 [api] Fix batch messages stuck in Nagle buffer and missing flush on list entities completion
The multi-message batch path in process_batch_multi_ bypassed
set_nodelay_for_message(), so batch data written to the socket would
sit in LWIP's Nagle buffer when log messages had previously enabled
Nagle. The remote wouldn't ACK until it sent its own data (e.g. a
ping), which could take 20+ seconds. This caused log-only API clients
(like esphome logs) to time out waiting for ListEntitiesDoneResponse.

Additionally, when LIST_ENTITIES completed without a state subscription,
the batched entity listing responses were never explicitly flushed —
they waited for the 100ms batch timer instead of being sent immediately
like the INITIAL_STATE completion path already did.

Fixes both issues:
- Call set_nodelay_for_message(false) before write_protobuf_messages
  in process_batch_multi_ to ensure TCP_NODELAY is on
- Extract finalize_iterator_sync_() helper and call it when
  LIST_ENTITIES completes without state_subscription
2026-04-08 10:37:05 -10:00
J. Nick Koston a72609e640 [yaml] Resolve top-level IncludeFile in load_yaml (#15557) 2026-04-08 08:39:14 -04:00
J. Nick KostonandCopilot a8b7c7a4ac [core] Add TemplatableFn for 4-byte function-pointer templatable storage (#15545)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-08 08:38:00 -04:00
J. Nick Koston ca61dc5d69 Merge remote-tracking branch 'upstream/test_merge_to_beta_again' into integration 2026-04-07 22:48:15 -10:00
J. Nick Koston 7ba5398418 Merge remote-tracking branch 'upstream/templatable-value-specialize' into integration 2026-04-07 22:48:10 -10:00
J. Nick Koston 618ee77e43 Merge remote-tracking branch 'upstream/fix-test-build-include-file' into test_merge_to_beta_again 2026-04-07 22:47:14 -10:00
J. Nick Koston 09ac7f4c41 Merge remote-tracking branch 'upstream/templatable-value-specialize' into test_merge_to_beta_again 2026-04-07 22:47:07 -10:00
J. Nick Koston 67f26b6cf7 fix 8266 flash string opt 2026-04-07 22:46:31 -10:00
J. Nick Koston 5079c86d1d Merge remote-tracking branch 'upstream/templatable-value-specialize' into integration 2026-04-07 21:51:20 -10:00
J. Nick Koston 76ef8be109 make the bot happy 2026-04-07 21:50:25 -10:00
J. Nick Koston b53f1c694b Add test for top-level !include resolution in load_yaml 2026-04-07 21:36:49 -10:00
J. Nick Koston 19740f44b4 Merge branch 'templatable-value-specialize' into test_merge_to_beta_again 2026-04-07 21:33:46 -10:00
J. Nick Koston 15c0996364 Merge remote-tracking branch 'origin/fix-test-build-include-file' into test_merge_to_beta_again 2026-04-07 21:33:41 -10:00
J. Nick Koston 01ae695439 Fix load_yaml returning unresolved IncludeFile for top-level !include
Move the IncludeFile resolution into _load_yaml_internal so all callers
get resolved content, rather than patching individual call sites.
2026-04-07 21:33:06 -10:00
J. Nick Koston fe17c86f58 now fix is always the same for unwrapped 2026-04-07 21:32:20 -10:00
J. Nick Koston 64d3fa52ce Fix test_build_components crash with top-level !include test files
The IncludeFile representer added in #15549 defers !include resolution,
but the component test scripts assumed load_yaml always returns a dict.
Test files using top-level !include (e.g. usb_uart) caused a TypeError:
'argument of type IncludeFile is not iterable'.

Resolve IncludeFile objects by calling .load() before processing.
2026-04-07 21:25:41 -10:00
J. Nick Koston b18c911429 another one 2026-04-07 21:24:01 -10:00
J. Nick Koston 8c0e619803 fix missing templatable in lightwaverf and match name to code 2026-04-07 21:24:01 -10:00
J. Nick Koston a5819d1185 another one 2026-04-07 21:23:27 -10:00
J. Nick Koston a01ba05dca fix missing templatable in lightwaverf and match name to code 2026-04-07 21:20:26 -10:00
J. Nick Koston b9c4bf9f25 Merge branch 'test_merge_to_beta_again' of https://github.com/esphome/esphome into test_merge_to_beta_again 2026-04-07 19:59:22 -10:00
J. Nick Koston 0ec3d34a01 Merge branch 'templatable-value-specialize' into test_merge_to_beta_again 2026-04-07 19:59:15 -10:00
J. Nick Koston 49b2882f2b [core] Fix TemplatableValue union for non-trivially-constructible types
Add explicit Storage union with trivial ctor/dtor so that
TemplatableValue works with non-trivially-constructible types like
std::vector<uint8_t>. The union's value_ lifetime is managed
externally via placement new and destroy_().

Reverts esp32_ble_server back to TEMPLATABLE_VALUE macro.
2026-04-07 19:56:41 -10:00
J. Nick Koston ee83f525c4 [core] Use is_trivially_copyable_v for TemplatableStorage selection
TemplatableStorage now selects TemplatableFn (4 bytes) for trivially
copyable types and TemplatableValue (8 bytes) for non-trivial types.

This automatically handles std::string (PROGMEM support) and
std::vector<uint8_t> (raw value assignment from C++) without
special-casing.

Reverts esp32_ble_server back to TEMPLATABLE_VALUE macro since
std::vector<uint8_t> now correctly gets TemplatableValue.
2026-04-07 19:51:52 -10:00
J. Nick Koston e22ded3803 more fixes 2026-04-07 19:47:43 -10:00
J. Nick Koston 439c3c9cbc Merge branch 'templatable-value-specialize' of https://github.com/esphome/esphome into templatable-value-specialize 2026-04-07 19:43:13 -10:00
J. Nick Koston e7ab67c031 [multiple] Fix raw value codegen for TEMPLATABLE_VALUE setters
- max7219digit: wrap bool state via cg.templatable
- number: wrap operation enum and cycle bool in deprecated CONF_MODE path
- select: wrap operation enum and cycle bool in deprecated CONF_MODE path
- datetime: wrap ESPTime struct initializers via cg.templatable
- display: wrap DisplayPage* pointer via cg.templatable
- speaker/media_player: wrap AudioFile* pointer via cg.templatable
2026-04-07 19:43:04 -10:00
J. Nick Koston 04f7789afa Merge remote-tracking branch 'origin/templatable-value-specialize' into test_merge_to_beta_again 2026-04-07 19:28:07 -10:00
J. Nick Koston 1d83efd714 Merge remote-tracking branch 'origin/templatable-value-specialize' into integration 2026-04-07 19:27:56 -10:00
J. Nick Koston e7a33a93eb Merge branch 'dev' of https://github.com/esphome/esphome into templatable-value-specialize 2026-04-07 19:27:41 -10:00
J. Nick KostonandCopilot 03d0ff1861 Update esphome/cpp_generator.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-07 19:27:31 -10:00
J. Nick Koston 43183c33ba [esp32_ble_tracker] Wrap continuous bool via cg.templatable for TemplatableFn 2026-04-07 19:27:16 -10:00
J. Nick Koston 85d87d73c1 [esp32_ble_tracker] Wrap continuous bool via cg.templatable for TemplatableFn 2026-04-07 19:26:48 -10:00
J. Nick Koston fd6ee51c71 empty head 2026-04-07 19:15:17 -10:00
J. Nick Koston 2a79f91947 Merge remote-tracking branch 'upstream/dev' into integration 2026-04-07 19:14:39 -10:00
J. Nick Koston f278e12841 Merge remote-tracking branch 'upstream/templatable-value-specialize' into integration 2026-04-07 19:14:36 -10:00
J. Nick Koston a6538d56d9 [multiple] Fix codegen type mismatches and raw value setter calls
- sprinkler: fix codegen to use cg.size_t for valve_number (was cg.uint8)
- remote_base/toto: move send_times/send_wait defaults to codegen
- remote_base/abbwelcome: wrap auto_message_id bool via cg.templatable
- http_request: wrap capture_response bool via cg.templatable
- core/automation.h: add casting trampoline to TemplatableValue (same as
  TemplatableFn) for codegen with mismatched return types
2026-04-07 19:10:19 -10:00
Jonathan Swoboda 9bf53e0ab8 [esp32_hosted] Add SPI transport and SDIO 1-bit bus width support (#15551) 2026-04-08 03:17:58 +00:00
J. Nick Koston c79d0e807b Merge branch 'templatable-value-specialize' of https://github.com/esphome/esphome into templatable-value-specialize 2026-04-07 17:10:58 -10:00
J. Nick Koston 42d217422e [speaker_source] Wrap pipeline constant via cg.templatable for TemplatableFn 2026-04-07 17:10:44 -10:00
J. Nick Koston 0dfd906cb5 Merge branch 'dev' of https://github.com/esphome/esphome into templatable-value-specialize 2026-04-07 17:09:39 -10:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 51f3f5c774 Bump esphome-dashboard from 20260210.0 to 20260408.1 (#15552)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-08 03:08:28 +00:00
SzewcsonJ. Nick Kostonpre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>J. Nick Koston
313b9fd5bf [gdk101] Retry reset on interval for slow-booting sensor MCU (#11750)
Co-authored-by: J. Nick Koston <nick@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-04-07 17:05:18 -10:00
J. Nick Koston e658a8559e [ethernet] Add W6100 and W6300 support for RP2040 (#15543) 2026-04-07 16:57:05 -10:00
J. Nick Koston d1ec4541db Merge branch 'dev' into templatable-value-specialize 2026-04-07 16:27:45 -10:00
J. Nick Koston 4db82877af [yaml] Add IncludeFile representer to ESPHomeDumper (#15549) 2026-04-07 16:27:11 -10:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 2e3ff4e215 Bump cryptography from 46.0.6 to 46.0.7 (#15550)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-08 02:11:51 +00:00
J. Nick Koston 2d9e03352c Merge remote-tracking branch 'upstream/fix-include-file-dumper' into templatable-value-specialize 2026-04-07 16:11:07 -10:00
J. Nick Koston 32fcbc8823 address bot comments 2026-04-07 16:10:40 -10:00