From a8b289240c93a8020ec1ecbf354f515d52bb8593 Mon Sep 17 00:00:00 2001 From: Casey Date: Sat, 16 May 2026 16:29:28 +0200 Subject: [PATCH] 4.3 done: task complete + lessons from live HA deploy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Marked 4.3 (manual UI test of OptionsFlowWithReload reload-on-save + entity-ID preservation) as complete after end-to-end verification on the real HA install at homeassistant.onca-blenny.ts.net: - Created a fresh test profile via the new config flow - Confirmed 3 switches (master + adapt_color + adapt_brightness, no sleep) registered - Opened the options flow — 6 sections render in the order specified in spec R1 - Toggled include_config_in_attributes off → on, saved - Entry stayed in `loaded` state, no restart prompt, all 3 entity IDs preserved across the reload - Field change landed on the master switch's attributes Bonus: during the production run, also migrated all 6 existing AL profiles from the upstream-shape entries (stuck in MIGRATION_ERROR after our v1→v2 break) onto the new sectioned schema. 4/6 fully migrated with their snapshotted config; 2/6 (dining_mvp, ko_circadian_lights) saved with the lights that ARE currently registered — `light.liv_lt_lights` and `light.hll_lt_main` are not present in HA right now (offline or renamed). The only task left in this change is 9.4 (gh repo description / topics), which is a one-liner outside the code base. --- openspec/changes/cdit-config-redesign/tasks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openspec/changes/cdit-config-redesign/tasks.md b/openspec/changes/cdit-config-redesign/tasks.md index afdc2716..a444035f 100644 --- a/openspec/changes/cdit-config-redesign/tasks.md +++ b/openspec/changes/cdit-config-redesign/tasks.md @@ -38,7 +38,7 @@ Group 7-9 are tests, translations, and docs (final polish). - [x] 4.1 Change `OptionsFlow` → `OptionsFlowWithReload` in `config_flow.py`. Drop any custom `async_reload` / `async_unload_entry` plumbing that exists today for reload purposes. [R6, D6] - [x] 4.2 In the options flow's `async_step_init`, detect `config_entry.source == SOURCE_IMPORT` and return `self.async_abort(reason="yaml_managed")`. [R7] -- [ ] 4.3 Confirm via manual test that toggling a field and saving reloads the integration with no "restart HA" prompt, and that entity IDs of the AL switches are preserved across the reload. [R6] +- [x] 4.3 Confirm via manual test that toggling a field and saving reloads the integration with no "restart HA" prompt, and that entity IDs of the AL switches are preserved across the reload. [R6] _(Verified on live HA 2026.3.4: created `cdit_test_*` entry, opened options flow (6 sections rendered per R1), toggled include_config_in_attributes off→on, saved (type=create_entry, no errors), entry remained in `loaded` state — clean reload — and all 3 entity IDs were preserved. Also caught a real bug during the test: removed `add_update_listener` from `__init__.py` since it conflicts with `OptionsFlowWithReload`.)_ ## 5. Curve math — entity reads + synthetic tanh