Adaptive Cover Pro ⛅ v2.28.0-beta.2
Pre-releaseThis beta builds on beta.1 (FOV-mode selector, low-sun edge-case fix, write-gating and geometry caching) by adding two config-flow bug fixes that unblock Measurements mode in practice: the mode switch can now be saved without the frontend blocking it, and imperial shaded-area values no longer compound on each form rerender.
🎯 Highlights
Beta — please test and report back.
- Try the new FOV-mode selector: configure a window using
MEASUREMENTSmode (reveal depth →fov_from_reveal()) and confirm the computed angles match your physical window. - Verify you can now switch to and save Measurements mode without the frontend blocking the save — this was broken in beta.1 and is fixed in beta.2.
- If your installation uses imperial units, toggle FOV mode and confirm the shaded-area depth value stays stable (does not compound) across rerenders.
- Verify the low-sun behavior change: at very low sun elevations the cover now returns 0 (fully closed) rather than the previous h_win value (fully open). Confirm this is correct for your installation.
- Geometry caching and write-gating are internal changes — normal operation should be unchanged. Flag any unexpected behavior.
✨ Features
FOV-mode selector (#565)
Adds a FovMode enum (ANGLES | MEASUREMENTS) and a new CONF_FOV_MODE option to the config flow. When MEASUREMENTS mode is selected, the integration derives the field of view from physical reveal depth via fov_from_reveal() rather than requiring manual angle entry. The fov_mode_schema() helper builds the relevant config-flow step, and supports_fov_mode on the cover-type policy gates the option to cover types where it applies. Translations updated for English, German, and French.
🐛 Bug Fixes
Measurements mode config-flow save blocked and imperial values compounding (#565)
Two bugs found during testing of the beta.1 FOV-mode selector, both in the config flow:
Measurements mode could not be saved. The FOV sliders (CONF_MAX_ELEVATION, CONF_MIN_ELEVATION) were emitted as vol.Required voluptuous markers. A vol.Required field triggers Home Assistant's frontend "all required fields filled" check, which blocked switching to Measurements mode before the backend could re-render the form with the sliders hidden. A new helper _as_optional() in cover_types/blind.py re-emits each affected marker as vol.Optional, preserving its existing default so the ANGLES default of 90 is unchanged and not duplicated. With the sliders vol.Optional, the frontend check no longer blocks the mode switch. Awnings are unaffected — their FOV fields stay vol.Required.
Imperial shaded-area value compounded on every form rerender. _show_sun_tracking_form in config_flow.py runs options_to_display (converting canonical metres to display inches). When a mode switch triggered a rerender, the raw already-display-unit user_input was fed back in and converted metres→inches a second time, so the value compounded on each rerender. The fix calls user_input_to_canonical(...) once up front (using _SUN_TRACKING_LENGTH_KEYS) and feeds that canonical value into every _show_sun_tracking_form re-display path, keeping the rerender re-feed symmetric with the initial render and the save path.
Low-sun edge case returns closed position (#559, #562)
At very low sun elevations a geometry edge case caused the cover calculation to return h_win (fully open) instead of 0 (fully closed). The fix corrects the return value so the cover closes rather than opens when the sun is near the horizon. Verified by test_low_elevation_calc_percentage_is_fully_closed.
🔧 Internal
Write-gating, geometry caching, and sun availability guard (#543)
Three robustness and performance improvements shipped together:
- Write-gating:
_acp_render_signature()detects when a calculated position is identical to the last written value and skips the HA state write, reducing redundant entity updates. - Geometry cache: Pure geometry helpers are decorated with
@lru_cache(maxsize=512), eliminating repeated identical calculations across update cycles. - Sun availability guard: A guard on
sun.sunsuppresses solar tracking when the sun entity is unavailable, preventing stale or error-state data from driving cover commands.
🧪 Testing
Test suite grows from 4,214 to 4,276 (+62 net new tests across both betas). New modules:
test_config_flow_fov_mode.py/test_fov_mode.py— FOV-mode selector andfov_from_reveal()calculationtest_entity_write_gating.py— write-gating behaviortest_geometry_cache.py— cache correctness and hit behaviortest_sun_unavailable_guard.py— solar tracking suppression when sun entity unavailabletest_blind_fov_fields_are_optional,test_awning_fov_fields_stay_required,test_measurements_mode_submittable_without_fov,test_imperial_shaded_area_stable_across_mode_switch_rerender— config-flow correctness for the beta.2 fixes
Compatibility
Requires Home Assistant 2026.3.0+. No new coupled-component requirements.