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
e7a33a93eb
Merge branch 'dev' of https://github.com/esphome/esphome into templatable-value-specialize
2026-04-07 19:27:41 -10:00
J. Nick Koston and Copilot
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
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]
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
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]
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
J. Nick Koston
a9ce676151
Merge remote-tracking branch 'upstream/fix-include-file-dumper' into templatable-value-specialize
2026-04-07 16:07:04 -10:00
J. Nick Koston
fbc36db395
Merge branch 'templatable-value-specialize' of https://github.com/esphome/esphome into templatable-value-specialize
2026-04-07 16:06:39 -10:00
J. Nick Koston
8399fb546e
[core] Deduplicate late std_string import in cg.templatable()
2026-04-07 16:06:30 -10:00
J. Nick Koston
6d44b37297
Merge branch 'dev' of https://github.com/esphome/esphome into templatable-value-specialize
2026-04-07 16:05:15 -10:00
Jonathan Swoboda
8ffe0f5e31
[core] Fix ANSI codes for secret text hiding ( #15521 )
2026-04-07 22:02:36 -04:00
J. Nick Koston
1d982c47cc
[yaml] Add tests for IncludeFile YAML dumper representer
2026-04-07 16:02:34 -10:00
J. Nick Koston
c7513b9262
[ci] Add lint check for test package key matching bus directory ( #15547 )
2026-04-07 16:01:18 -10:00
J. Nick Koston
67eec208bd
[yaml] Add IncludeFile representer to ESPHomeDumper
...
The deferred IncludeFile objects introduced in #12213 could not be
serialized by the YAML dumper, causing test_build_components to fail
when merging configs that contain !include package references.
Uses add_multi_representer to also match the dynamically-created
ESPHomeDataBase subclass produced by add_class_to_obj.
2026-04-07 16:01:05 -10:00
J. Nick Koston
ed51c3ab9b
Merge branch 'dev' into templatable-value-specialize
2026-04-07 15:58:40 -10:00
J. Nick Koston
de7f081799
[emontx] Fix uart package name in tests ( #15546 )
2026-04-07 21:52:37 -04:00
J. Nick Koston
2b35843131
Merge branch 'templatable-value-specialize' of https://github.com/esphome/esphome into templatable-value-specialize
2026-04-07 15:48:28 -10:00
J. Nick Koston
dc9cf44eb1
Merge remote-tracking branch 'upstream/dev' into templatable-value-specialize
2026-04-07 15:48:17 -10:00
J. Nick Koston
30d3710b9a
Merge branch 'dev' into templatable-value-specialize
2026-04-07 15:48:06 -10:00
J. Nick Koston
810f22e8c9
[sprinkler] Use TemplatableValue for valve_to_start (set from C++ with raw value)
...
valve_to_start is set from both codegen (lambdas) and C++ code
(raw size_t in sprinkler.cpp:387). Use TemplatableValue directly
instead of the TEMPLATABLE_VALUE macro since TemplatableFn doesn't
accept raw runtime values.
2026-04-07 15:39:31 -10:00
J. Nick Koston
fc8de545f3
[globals] Wrap raw constants in stateless lambda for TemplatableFn
...
globals.set action passed raw values with output_type=None, bypassing
the lambda wrapping in cg.templatable(). Now explicitly wraps constants
in a stateless lambda with no return type annotation (compiler deduces
the correct type from the value).
2026-04-07 15:34:28 -10:00
Clyde Stubbs
88f4067dd6
[lvgl] Implement rotation with PPA ( #15453 )
2026-04-08 13:19:29 +12:00
d20d613c1d
[substitutions] !include ${filename}, Substitutions in include filename paths (package refactor part 5) ( #12213 )
...
Co-authored-by: J. Nick Koston <nick@home-assistant.io >
Co-authored-by: J. Nick Koston <nick@koston.org >
2026-04-07 15:12:55 -10:00
Clyde Stubbs
801f3fadaa
[epaper_spi] Fix deep sleep command ( #15544 )
2026-04-08 13:00:39 +12:00
J. Nick Koston
0ec4e98374
[core] Expand = delete to catch inconvertible return types, add to_exp test
...
- TemplatableFn = delete now catches both stateful lambdas AND stateless
lambdas with inconvertible return types (e.g., string -> int)
- Add test for to_exp with non-string output_type (lambda-wraps result)
2026-04-07 14:54:41 -10:00
J. Nick Koston
226908a64a
reduce review load
2026-04-07 14:44:10 -10:00
J. Nick Koston
0326b1e93a
[core] Restore = delete for stateful lambdas in TemplatableFn
2026-04-07 14:40:32 -10:00
J. Nick Koston
4cc6624cb0
[core] Emit deprecation warning on TemplatableFn return type mismatch
2026-04-07 14:37:54 -10:00
J. Nick Koston
05011a28a0
[core] Support convertible return types in TemplatableFn via trampoline
...
TemplatableFn now accepts stateless lambdas whose return type is
convertible to T (e.g., int -> uint8_t). Uses a casting trampoline
that reconstructs the stateless lambda via F{} (default-constructible
in C++20).
Also:
- Remove std::move on trivially copyable TemplatableFn (clang-tidy)
- Wrap http_request method via cg.templatable()
2026-04-07 14:35:22 -10:00
J. Nick Koston
d277dc5ae9
[lvgl][sensor] Remove std::move on trivially copyable TemplatableFn
...
clang-tidy flags std::move on trivially copyable types as no-op.
TemplatableFn is a single function pointer — copy is equivalent.
2026-04-07 14:33:04 -10:00
J. Nick Koston
a3dec4053d
[http_request] Wrap method constant via cg.templatable for TemplatableFn
2026-04-07 14:23:10 -10:00
J. Nick Koston
89bd529cf9
[mdns] Add comment explaining why manual lambda wrapping is needed
2026-04-07 14:18:32 -10:00
J. Nick Koston
6d0c61dc73
[core] Use TemplatableStorage alias to select TemplatableFn or TemplatableValue
...
TEMPLATABLE_VALUE macro now uses TemplatableStorage<T, Ts...> which
selects TemplatableFn for non-string types (4 bytes) and
TemplatableValue for std::string (full PROGMEM/FlashStringHelper support).
Fixes ESP8266 compile failure where __FlashStringHelper* couldn't
assign to TemplatableFn<std::string>.
2026-04-07 14:17:41 -10:00
J. Nick Koston
0dddeea4d2
[core] Assert stateless capture in test, fix TemplatableFn comment
2026-04-07 14:10:18 -10:00
J. Nick Koston
8f6acbd42d
[core] Add const to string specialization optional_value/value_or
2026-04-07 14:04:00 -10:00
J. Nick Koston
779faec9a5
[mdns] Move LambdaExpression import to top level
2026-04-07 13:57:10 -10:00
J. Nick Koston
29a6361df3
[mdns] Wrap raw port values in lambda in mdns_service() public API
2026-04-07 13:56:46 -10:00
J. Nick Koston
d0754d1466
[core] Fix TemplatableValue move: destroy moved-from value for non-trivial T
2026-04-07 13:55:12 -10:00