Replies: 1 comment
|
I agree that managing many covers gets challenging given the number of configurable options, and the shared-sensor case is the clearest example: one weather station and one outdoor lux sensor end up entered on every cover, then re-entered whenever a sensor changes. I've opened #693 to track this as an enhancement so we can work through the design before any implementation. I carried over your Building Profile proposal and implementation sketch as the starting point, kept the building-level-sensor / cover-level-threshold split, and added a few open questions at the bottom (one profile vs. composing several, what a profile owns beyond the entity ID, and whether the cover-type sensor filtering is worth shipping on its own first). Let's continue the detailed discussion on #693. |
Uh oh!
There was an error while loading. Please reload this page.
Problem
Every ACP instance today is a fully independent config entry. All settings — including weather sensors, lux/irradiance sensors, cloud coverage, outside temperature — must be configured separately on each cover, even though in most buildings these sensors are physically shared across all openings (one weather station, one outdoor lux sensor, etc.).
The existing Sync feature (Options → "Copy to Other Covers") partially addresses this, but it has a fundamental limitation: it is a one-time manual push. If you later swap your weather station entity, you have to sync again to every cover. There is also no enforcement that irrelevant sensors are excluded — e.g. a rain sensor being configured on a venetian blind (which is behind the window pane and physically unaffected by rain).
Proposed solution: Building Profile entry
Add a new virtual entry type —
sensor_type = "building_profile"— within the same integration domain (adaptive_cover_pro). No separate HACS package, no new integration manifest entry.A Building Profile holds only the sensor entity IDs that are building-level (one per building/weather station), with no geometry, no thresholds, and no cover entities:
weather.*)Each cover instance gets one new optional field: "Building Profile" — a selector listing all existing profile entries in the domain. When linked:
weather_overrideandlight_cloudconfig screens only show thresholds and modes (wind speed threshold, rain threshold, lux threshold, etc.) — not sensor pickersCovers without a linked profile continue to work exactly as today — fully backward compatible.
Why thresholds stay per-cover
A south-facing exposed awning may retract at 40 km/h wind; a sheltered east-facing awning can tolerate 60 km/h. A bedroom lux threshold for "close the blind" differs from the living room. The sensor is building-level; the reaction is cover-level. This is exactly the split the existing
_SYNC_UI_CATEGORIESalready models (*_valuesvs*_sensors) — the profile formalises it structurally.Cover-type sensor filtering (companion improvement)
Not all sensors are meaningful for all cover types. A rain sensor is physically irrelevant for a venetian blind (behind the window pane); wind speed is irrelevant for a vertical blind inside a reveal. As part of this change, the weather override config screen should only show sensors relevant to each type:
This can be implemented with a single new
ClassVar[bool]onCoverTypePolicy(e.g.weather_retraction_relevant) and a guard inweather_override_schema()inconfig_dynamic.py.Implementation sketch
The changes are localised to a small number of files with no breaking changes:
const.pyCoverType.BUILDING_PROFILE = "building_profile"CONF_BUILDING_PROFILE_ID = "building_profile_id"_BUILDING_PROFILE_SENSOR_KEYSfrozenset (the canonical list of profile-owned keys)config_flow.py"building_profile"to the initial cover-type selectorasync_step_profile_linkscreen listing existing profilesweather_overrideandlight_cloudstepsconfig_types.pyRuntimeConfig.from_options_with_profile(options, profile_options)factory that merges profile sensor keys over the cover's own options before constructing the dataclass__init__.pyCONF_BUILDING_PROFILE_IDis set, register anadd_update_listeneron the profile entry that triggers a reload of the cover entryasync_track_state_change_eventregistration so the coordinator reacts immediately when a profile sensor changes statecover_types/base.pyweather_retraction_relevant: ClassVar[bool] = FalseAwningPolicyandOscillatingAwningPolicyset itTruemigrations.pyCONF_BUILDING_PROFILE_IDabsent on old entries = standalone, no data transformation needed)cover_types/BuildingProfilePolicyno-op policy soget_policy("building_profile")returns cleanly andasync_setup_entryloads no platforms for profile entriesWhat happens to the Sync feature
It does not go away. With a profile in place:
*_sensorssync categories become irrelevant for linked covers (sensors come from the profile) and can be hidden from the sync screen when a profile is linked*_valuessync categories (thresholds, modes, flags) remain useful — each cover keeps its own thresholds, and sync is still the right tool to align them across similar coversBackward compatibility
CONF_BUILDING_PROFILE_ID→ treated as standalone, behaviour unchangedbuilding_profileentry type is additive; no existing entry type is modifiedDoes this align with the project direction? Happy to elaborate on any part or work up a more detailed spec for a specific component.
All reactions