Commit Graph
31363 Commits
Author SHA1 Message Date
Brandon HarveyandClaude Opus 4.7 a460f5343c [automation] Fix codegen type for component.resume update_interval (#16069)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 08:14:02 +12:00
Jesse Hills 7c2a63bf82 [api] Use safe_print for log output and fix safe_print bytes-repr fallback (#16160) 2026-05-05 08:12:20 +12:00
Diorcet Yann 690a197346 [main] Move stacktrace handling out of platformio_api and FlashImage into platform components/util (#16186) 2026-05-04 15:07:31 -04:00
J. Nick KostonandCopilot 24d4da1021 [sensor] Document why TimeoutFilterBase intentionally keeps Component (#16194)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-05-04 01:18:28 +00:00
J. Nick Koston 53c4e6f386 [tests] Drop duplicate on_boot_restore_from in host_mode_climate_basic_state (#16228) 2026-05-03 20:12:51 -05:00
J. Nick Koston 1d63158480 [zephyr] Add nRF52 component tests so CI runs on zephyr-only changes (#16188) 2026-05-03 20:05:56 -05:00
J. Nick Koston 013dee44eb [binary_sensor] Drop Component from AutorepeatFilter, use self-keyed scheduler (#16191) 2026-05-03 20:05:27 -05:00
J. Nick Koston 9ddb828da3 [api] Don't tear down log connection on stack-trace decode failure (#16196) 2026-05-03 20:05:13 -05:00
J. Nick Koston 120d1e51fb [tests] Fix flaky host_mode_climate_basic_state integration test (#16192) 2026-05-03 20:04:34 -05:00
J. Nick Koston 844a36f7a1 [api] Mark high-volume proxy messages as speed_optimized (Infrared/RF, Z-Wave, serial) (#16159) 2026-05-03 20:03:52 -05:00
J. Nick Koston 72a75f2d3f [cover] Fold ControlAction/CoverPublishAction fields into stateless lambdas (#16046) 2026-05-03 20:02:07 -05:00
J. Nick KostonandCopilot Autofix powered by AI b5eb444015 [dashboard] Stabilize device-builder dashboard backend's API surface (#16206)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-03 20:01:51 -05:00
J. Nick Koston 15ab5422c7 [ci] Run downstream device-builder tests against PR Python code (#16214) 2026-05-03 19:45:08 -05:00
J. Nick Koston 33f88619da [valve] Fix ControlAction trigger args with reference types (#16223) 2026-05-03 19:44:21 -05:00
J. Nick Koston df1200629f [tests] Fix flaky host_mode_climate_basic_state (#16225) 2026-05-03 19:44:11 -05:00
J. Nick Koston 41bd570d30 [light] Fix LightControlAction trigger args with reference types (#16220) 2026-05-03 19:44:01 -05:00
J. Nick Koston cf223674e5 [climate] Fix ControlAction trigger args with reference types (#16221) 2026-05-03 19:43:49 -05:00
J. Nick Koston af74b639cf [fan] Fix TurnOnAction trigger args with reference types (#16222) 2026-05-03 19:43:35 -05:00
J. Nick Koston 4108b27197 [esp8266] Lower WDT_FEED_INTERVAL_MS to 100 ms (#16197) 2026-05-03 19:43:09 -05:00
7cfab58a05 [ota] Add partition table update functionality to ota component (#15780)
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>
Co-authored-by: J. Nick Koston <nick@koston.org>
2026-05-03 19:42:10 -05:00
tomaszduda23 85e1e4b95e [zephyr] feed watchdog early. Otherwise OTA may rollback. (#16218) 2026-05-03 20:37:32 -04:00
J. Nick Koston 178327469e Merge branch 'partition-table-ota' into integration 2026-05-03 18:21:01 -05:00
J. Nick Koston 0cd682f29e Merge remote-tracking branch 'upstream/fix-valve-action-trigger-args' into integration 2026-05-03 18:20:42 -05:00
J. Nick Koston 39a47b7d47 Merge remote-tracking branch 'upstream/fix-light-action-trigger-args' into integration 2026-05-03 18:20:38 -05:00
J. Nick Koston 5c015ede77 Merge remote-tracking branch 'upstream/fix-flaky-host-mode-climate-basic-state' into integration 2026-05-03 18:20:34 -05:00
J. Nick Koston b5866f072c Merge remote-tracking branch 'upstream/fix-fan-action-trigger-args' into integration 2026-05-03 18:20:30 -05:00
J. Nick Koston 76d4f70d70 Merge remote-tracking branch 'upstream/fix-climate-action-trigger-args' into integration 2026-05-03 18:20:26 -05:00
J. Nick Koston 9f58b66f97 Merge remote-tracking branch 'upstream/dev' into integration 2026-05-03 18:20:20 -05:00
J. Nick Koston da06bb9c7f [ota] Skip safe_shutdown after partition-table OTA
For OTA_TYPE_UPDATE_PARTITION_TABLE the success path runs
nvs_flash_deinit() before the final write, which leaves every
preference handle held by other components invalid. App.safe_reboot()
calls on_safe_shutdown() which tries to flush preferences, and each
flush fails with ESP_ERR_NVS_INVALID_HANDLE -- noisy log spam during
the reboot window.

App.reboot() skips the safe-shutdown callbacks and goes straight to
esp_restart(). For partition-table OTAs there is nothing useful to
flush (NVS handles are already dead, the device is moments from a
reboot anyway), so reboot directly.

App-OTA path is unchanged: safe_reboot() still runs on_safe_shutdown
so preferences are saved on the way out.
2026-05-03 18:19:24 -05:00
J. Nick Koston aec754f9a2 Merge branch 'dev' into fix-climate-action-trigger-args 2026-05-03 17:57:53 -05:00
J. Nick Koston 0f174ee626 [api] Fall back to owning types for service array args used after a delay (#16140) 2026-05-04 10:55:40 +12:00
J. Nick Koston 59de35a7b8 [fan] Cover fan.turn_on inside on_preset_set (StringRef Ts) in tests 2026-05-03 17:52:58 -05:00
J. Nick Koston 1f9afebbf5 [ota] Make partition-table verify errors actionable
When the running app does not fit any slot in the new partition table,
the user has almost certainly picked the wrong migration .bin for
their device. Replace the generic "No compatible app partition found"
error with one that prints the running app's offset, used size, and
the size limit a migration method must clear, plus an explicit
reassurance that no flash content has been modified yet.

Same treatment for the otadata-overlap case: include the running app
offset/size and tell the user to pick a different migration method.

Verification phase is non-destructive, so these errors are recoverable
by retrying with the correct .bin -- the new wording makes that
explicit so users don't lose time on a brick scare they aren't in.

No code-flow change; only log message wording.
2026-05-03 17:52:55 -05:00
J. Nick Koston 37a44a8a6f [tests] Fix flaky host_mode_climate_basic_state by ignoring prior MEMORY state
The fixture shares the `host-climate-test` build dir with
host_mode_climate_control.yaml. When the control test runs first and
leaves the thermostat in HEAT mode, MEMORY restore on the next basic_state
boot picked up HEAT and the initial-state assertion failed
(`assert ClimateMode.HEAT == ClimateMode.OFF`).
2026-05-03 17:39:39 -05:00
J. Nick Koston 7c667bb9f4 [valve] Normalize trigger args to const remove_cvref_t<T> & 2026-05-03 17:31:09 -05:00
J. Nick Koston e4de502bd4 [fan] Normalize trigger args to const remove_cvref_t<T> & 2026-05-03 17:30:01 -05:00
J. Nick Koston 10ea8c3492 [light] Normalize trigger args to const remove_cvref_t<T> & 2026-05-03 17:29:25 -05:00
J. Nick Koston 102618b11c [climate] Normalize trigger args to const remove_cvref_t<T> & 2026-05-03 17:28:38 -05:00
J. Nick Koston 22252ef5b5 [light] Forward trigger args as Ts... so inner-lambda calls type-check 2026-05-03 17:26:39 -05:00
J. Nick Koston b62d88a5d1 [valve] Forward trigger args as Ts... so inner-lambda calls type-check 2026-05-03 17:25:30 -05:00
J. Nick Koston 431385ebc1 [valve] Use const remove_reference_t<T> & to avoid copies of non-ref Ts 2026-05-03 16:56:14 -05:00
J. Nick Koston 1509db2a2c [fan] Use const remove_reference_t<T> & to avoid copies of non-ref Ts 2026-05-03 16:55:09 -05:00
J. Nick Koston 5483b27bbf [light] Use const remove_reference_t<T> & to avoid copies of non-ref Ts 2026-05-03 16:54:21 -05:00
J. Nick Koston a73a9516c2 [climate] Use const remove_reference_t<T> & to avoid copies of non-ref Ts 2026-05-03 16:53:10 -05:00
J. Nick Koston dd0cff5f45 [light] Reword apply-fn comments to describe codegen failure mode 2026-05-03 16:51:27 -05:00
J. Nick Koston fb6920a5b1 [valve] Fix ControlAction trigger args with reference types
`const Ts &...` is ill-formed when Ts is already a reference (e.g. a
trigger that passes `std::string &`). Forward Ts by-value so the
generated lambda matches ApplyFn for any valid trigger arg type.
2026-05-03 16:12:08 -05:00
J. Nick Koston d481d0cb4a [fan] Fix TurnOnAction trigger args with reference types
`const Ts &...` is ill-formed when Ts is already a reference (e.g. a
trigger that passes `std::string &`). Forward Ts by-value so the
generated lambda matches ApplyFn for any valid trigger arg type.
2026-05-03 16:10:03 -05:00
J. Nick Koston 31239ac950 [climate] Fix ControlAction trigger args with reference types
`const Ts &...` is ill-formed when Ts is already a reference (e.g. a
trigger that passes `std::string &`). Forward Ts by-value so the
generated lambda matches ApplyFn for any valid trigger arg type.
2026-05-03 16:08:39 -05:00
J. Nick Koston 7aa9f0d796 [light] Fix LightControlAction trigger args with reference types
`const Ts &...` is ill-formed when Ts is already a reference (e.g. a
trigger that passes `std::string &`). Forward Ts by-value so the
generated lambda matches ApplyFn for any valid trigger arg type.
2026-05-03 16:06:54 -05:00
J. Nick Koston d30f82784c [ota] Drop ineffective NvsReinitGuard; soften brick wording
Mat931 verified empirically that ``nvs_flash_init()`` after
``nvs_flash_deinit()`` does not revive NVS handles already held by
other components: writes still fail with ESP_ERR_NVS_INVALID_HANDLE.
The guard therefore only created the appearance of a recovery path.

Remove it and document the actual contract: from nvs_flash_deinit()
onward, components that hold open NVS handles will fail until the
device is rebooted. The success path reboots immediately, so it is
unaffected; the failure path now tells the user clearly to reboot
and retry, rather than implying retry-without-reboot will work.

Also soften the "permanently brick" wording in the pre-write log
warning -- a bad partition-table OTA leaves a device that needs a
serial flash to recover, not a permanently-dead one.
2026-05-03 14:24:59 -05:00