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
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.
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.
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.
- 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
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>