Commit Graph
14328 Commits
Author SHA1 Message Date
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
J. Nick Koston 11934ab27f [sensor] Wrap benchmark filter constants in lambdas for TemplatableFn 2026-04-07 13:49:55 -10:00
J. Nick Koston 4f4f256ab3 convert a few more 2026-04-07 13:44:23 -10:00
J. Nick Koston be8449a39a convert a few more 2026-04-07 13:43:13 -10:00
J. Nick Koston d78a3ab41b convert a few more 2026-04-07 13:42:35 -10:00
J. Nick Koston b53b6e9218 convert a few more 2026-04-07 13:42:29 -10:00
J. Nick Koston a9e9064aa3 convert a few more 2026-04-07 13:42:00 -10:00
J. Nick Koston 03677db79a [core] Add TemplatableFn and TemplatableValue (value+fn) dual storage
- TemplatableFn<T, X...>: 4-byte function-pointer-only storage, used by
  TEMPLATABLE_VALUE macro for codegen-managed fields
- TemplatableValue<T, X...>: 8-byte value-or-function-pointer storage,
  backward compatible with raw constant init and assignment
- Revert api/user_services.h to original (uses TemplatableValue)
- Optimize sensor/number min_/max_ to TemplatableFn
- Optimize mdns port to TemplatableFn with lambda wrappers
2026-04-07 13:37:18 -10:00
J. Nick Koston 8cd78441a6 Revert "[sensor] Wrap filter constants in lambdas for TemplatableValue in benchmarks"
This reverts commit 5e2187581a.
2026-04-07 13:34:11 -10:00
J. Nick Koston dc38cf0ced Revert "[mdns] Wrap port assignments in stateless lambdas for TemplatableValue"
This reverts commit 1ba33e485a.
2026-04-07 13:34:11 -10:00
J. Nick Koston 5e2187581a [sensor] Wrap filter constants in lambdas for TemplatableValue in benchmarks 2026-04-07 13:26:21 -10:00
J. Nick Koston 1ba33e485a [mdns] Wrap port assignments in stateless lambdas for TemplatableValue
TemplatableValue<uint16_t> no longer accepts raw integer assignment.
Wrap USE_WEBSERVER_PORT, USE_SENDSPIN_PORT, and get_port() calls in
stateless lambdas.
2026-04-07 13:21:50 -10:00
J. Nick Koston 9bf0133525 [core] Specialize TemplatableValue for non-string types as function pointer
Specialize TemplatableValue so non-string types use function-pointer-only
storage (4 bytes on 32-bit) instead of the tagged union with std::function
support (8 bytes). The std::string specialization retains full support for
VALUE, STATIC_STRING, FLASH_STRING, and stateful lambdas.

Codegen now wraps non-string constants in stateless lambdas automatically,
so the generated C++ always assigns a function pointer.
2026-04-07 13:16:14 -10:00
Jonathan Swoboda aad898503d [multiple] Fix channel/pin range validation and widen channel types (#15529) 2026-04-07 18:37:17 -04:00
14bcdfe700 [emontx] emonTx component (#9027)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2026-04-07 22:29:55 +00:00
Jonathan Swoboda 0d7f2f05b9 [libretiny] Fix board pin alias resolution TypeError (#15527) 2026-04-07 18:16:37 -04:00
Edward Firmopre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>Copilot Autofix powered by AIJ. Nick Koston
ee7b38504b [nextion] Expose custom protocol frames as automation triggers (#13248)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2026-04-07 22:13:58 +00:00
J. Nick Koston 5d31f4aeba [light] Use function-pointer fields in LightControlAction (#15132) 2026-04-07 12:00:17 -10:00
Jonathan Swoboda 9fe4d5c63d [rp2040_pio_led_strip][rp2040_pio] Fix CUSTOM chipset crash and improve error message (#15537) 2026-04-07 11:56:50 -10:00
Jonathan Swoboda 97ad5ab35f [udp] Fix on_receive only processing first automation (#15538) 2026-04-07 11:56:01 -10:00
Jonathan Swoboda e7ddc6f6d3 [multiple] Fix validation ranges (batch 2) (#15533) 2026-04-07 17:54:57 -04:00
Jonathan Swoboda cbcf80081b [pcf8563] Fix default I2C address from 8-bit (0xA3) to 7-bit (0x51) (#15526) 2026-04-07 17:54:12 -04:00
Jonathan Swoboda 3073f3ec5c [haier] Fix control_method schema incorrectly using ensure_list (#15523) 2026-04-07 17:53:16 -04:00
Jonathan Swoboda 5a52936f72 [graph] Fix legend config incorrectly accepting a list (#15522) 2026-04-07 17:52:33 -04:00
Jonathan Swoboda 3ca3cdc5e2 [multiple] Fix missing entity base classes in Python class declarations (#15534) 2026-04-07 11:44:28 -10:00
Jonathan Swoboda 4ebfe71b8f [seeed_mr24hpc1] Move baud rate validation to FINAL_VALIDATE_SCHEMA (#15536) 2026-04-07 11:42:33 -10:00
Jonathan Swoboda 2fe6cb392b [rotary_encoder] Fix set_value action accepting any sensor ID (#15535) 2026-04-07 11:40:43 -10:00
Edward Firmo d354747da0 [nextion] Fix format specifiers and error message typos in command handlers (#15542) 2026-04-07 21:10:56 +00:00
Jonathan Swoboda 17ec5389d8 [mcp4461] Fix terminal disable passing string where C++ expects char (#15528) 2026-04-07 11:07:28 -10:00
Jonathan Swoboda 687753b0be [lightwaverf] Fix write pin using input schema instead of output (#15525) 2026-04-07 11:03:55 -10:00
Jonathan Swoboda 186525e77d [ld2420] Fix select options wrapped in extra list (#15524) 2026-04-07 10:57:26 -10:00
Jonathan Swoboda 9d396cea5a [grove_tb6612fng] Move direction logic from Python to C++ to fix lambda crash (#15513) 2026-04-07 10:56:25 -10:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> ac14b9e558 Bump pypa/gh-action-pypi-publish from 1.13.0 to 1.14.0 (#15541)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-07 10:40:21 -10:00
J. Nick Koston ef6c65c7ec [cli] Add config bundle CLI command for remote compilation (#13791) 2026-04-07 10:37:19 -10:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> c6c743e2bb Bump pytest from 9.0.2 to 9.0.3 (#15540)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-07 10:26:11 -10:00
J. Nick Koston 6460f3a757 [api] Add max_data_length and force to DeviceInfoResponse/HelloResponse proto fields (#15514) 2026-04-07 10:24:36 -10:00
J. Nick Koston 0d809a7481 [automation] Add CallbackAutomation dataclass and build_callback_automations helper (#15246) 2026-04-07 10:09:27 -10:00
J. Nick Koston 674d030cbb [core] Reschedule fired intervals directly into heap (#15516) 2026-04-07 07:36:55 -10:00
Diorcet Yann 7ab7538220 [hdc2080] Fix tests (#15518) 2026-04-06 21:59:05 -10:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 488a6a1c40 Bump aioesphomeapi from 44.11.1 to 44.12.0 (#15515)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-07 05:15:03 +00:00
J. Nick Koston f94e1dfab6 [core] Move ControllerRegistry notify methods inline into header (#15505) 2026-04-07 16:12:01 +12:00
Jonathan Swoboda e49384cd57 [dfrobot_sen0395] Fix list.index() on mutated list in range validator (#15511) 2026-04-06 23:42:39 -04:00
J. Nick Koston 10b38e1588 [api] Add max_data_length proto option and optimize entity name/object_id (#15426) 2026-04-07 03:31:01 +00:00
Jonathan Swoboda b6ef1a58fb [multiple] Fix validation ranges and error messages (#15508) 2026-04-06 23:17:35 -04:00