Skip to content

Adaptive Cover Pro ⛅ v2.22.0-beta.3

Pre-release
Pre-release

Choose a tag to compare

@jrhubott jrhubott released this 19 May 22:05
· 235 commits to main since this release

ℹ Using release notes from: release_notes/v2.22.0-beta.3.md

v2.22.0-beta.3

🎯 Should I install this?

This is a small follow-up to beta.2. It picks up one bug fix that landed on main after beta.2 was tagged, and completes the config-flow refactor with two final cleanup PRs. No user-visible behaviour changes.

  • If you were already running beta.2 and it was working, install this — you get the Is Sunny clear fix and the final config-flow cleanup at no risk.
  • If you are on v2.21.5 without any active issue, stay there. This beta exists to validate the full refactor before a stable release, not to deliver new capabilities.
  • If you reported issue #377 or a related "field won't clear" options-flow problem, please install this and confirm.

🔑 What's new in beta.3

🐛 Bug Fixes

  • "Is Sunny" sensor can now be cleared in the options flow (#377, PR #393): In the options flow, the cloud-suppression "Is Sunny" binary sensor field could not be cleared after a value was set. The UI accepted a blank submission but the prior value silently persisted on save. Root cause is the same class as #377: vol.Optional keys with implicit default=vol.UNDEFINED must appear in the optional-entities list that the schema layer uses to recognise cleared fields. The CONF_BINARY_SENSOR key for the Is Sunny field was absent from that list. The fix adds it, so a blank submission is now treated as "remove this value" rather than "keep the previous one".

🧹 Chores

  • Phase I — config-flow plumbing refactor (PR #399): The config-flow file carried duplicated glue across the wizard and options flow handlers: the same schema reads, the same step routing, and the same options-step boilerplate appeared in both paths. This phase collapses that into shared helpers, reducing config_flow.py by 168 lines with no change to user-visible behaviour. The wizard chain and options menu render the same steps in the same order. This is the final phase in the A–I refactor series; Phases A–H landed in beta.1 and beta.2.

  • Legacy climate step removed + optional-key co-location (PR #400): Two sub-refactors combined:

    • Legacy climate step removed (#391): ConfigFlowHandler.async_step_climate and OptionsFlowHandler.async_step_climate had been unreachable since the climate step was split into light_cloud and temperature_climate. The dead methods, the CLIMATE_SCHEMA they referenced, and the corresponding config.step.climate / options.step.climate translation blocks in en.json, de.json, and fr.json (85 lines per file) are removed. SYNC_CATEGORIES["climate"] is kept — it is a separate programmatic sync alias, still covered by tests.

    • Optional-key constants co-located with their schemas (#392): Inline optional-entities lists for WEATHER_OVERRIDE, LIGHT_CLOUD, and TEMPERATURE_CLIMATE schemas were duplicated across ConfigFlowHandler and OptionsFlowHandler — the same drift surface that produced issues #323 and #377. These are extracted to three module-level constants placed adjacent to their schemas. The change also fixes a latent #377-class omission: CONF_CLOUDY_POSITION was missing from both inline lists, so clearing the field in the UI silently kept the prior value. It is now in the _LIGHT_CLOUD_OPTIONAL_KEYS constant. A new parametrised TestOptionalKeyConstants test guard walks each schema and asserts that every vol.Optional key with an implicit default is present in the corresponding constant — no missing keys, no stale ones.

📖 Cumulative beta scope

beta.3 is cumulative. Everything in v2.22.0-beta.1 and v2.22.0-beta.2 is included:

  • Nine-phase internal refactor (Phases A–H, beta.1/beta.2): Coordinator responsibility distributed into managers/, state/, pipeline/, and cover_types/. Coordinator is ~640 lines lighter vs v2.21.5. Manual-override detection in managers/cover_command/state_classifier.py; cover-type-specific behaviour on CoverTypePolicy subclasses; cover-type literal branching eliminated. Net diff for the refactor: 62 files, +3,682 / −1,251 lines.

  • Post-settle cap grace — false venetian override fix (#33, beta.2): DualAxisSequencer.is_in_suppression_with_cap holds the cap bypass active for 5 seconds after a position command stamp, preventing KNX, Shelly 2PM, FGR223, and similar actuators from tripping false manual-override when cover.state settles before the tilt-walk burst finishes publishing.

  • Phase I — config-flow plumbing refactor (beta.3, above).

  • Legacy climate step + optional-key cleanup (beta.3, above).

🧪 Testing

3384 tests passing (up from 3380 in v2.22.0-beta.2).

New in beta.3:

  • TestOptionalKeyConstants parametrised guard in tests/test_config_ux_simplification.py walks WEATHER_OVERRIDE, LIGHT_CLOUD, and TEMPERATURE_CLIMATE schemas and asserts every vol.Optional key with an implicit default is covered by its constant.

Compatibility

  • Home Assistant 2026.3.0+
  • Python 3.11+

References