Skip to content

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 26 May 06:11
· 152 commits to main since this release

v2.0.0

Highlights

v2.0 is the tile-card release. The headline addition is adaptive-cover-pro-tile-card — a compact, dense card purpose-built for dashboards with many Adaptive Cover Pro covers — paired with an ACP-specific more-info dialog that shows a plain-English pipeline summary, a today's-forecast strip with hover affordances, and direct controls without leaving the dashboard. Every user-visible string in the card is now routed through a translation layer, shipping with reviewed English and French. Alongside the new UI, every service write now travels through the adaptive_cover_pro domain (set_position, stop) so the integration's adaptive loop recognizes card commands as ACP-originated — correcting a class of override conflicts that affected anyone using manual_ignore_external mode. Requires Adaptive Cover Pro integration v2.22.1-beta.3 or newer.

Added

  • adaptive-cover-pro-tile-card (src/adaptive-cover-pro-tile-card.ts) — new custom element optimised for dense dashboards. A single compact row shows the cover icon, entry title, current position (with optional localized state label via show_state), ↑■↓ control buttons, a contextual badge, and an inline Resume button that appears when a manual or custom-position override is constraining the cover. The icon carries a motion-sensor overlay (mdi:motion-sensor in --warning-color) when motion_status_sensor reports motion_detected or timeout_pending, controlled by show_motion_icon.

  • adaptive-cover-pro-tile-card-editor (src/adaptive-cover-pro-tile-card-editor.ts) — ha-form-driven visual editor for the tile card. Exposes icon, show_controls, show_badge, show_resume (auto/always/never), show_state, show_motion_icon, show_decision_summary, tap_action, hold_action, and double_tap_action. Pre-fills with runtime defaults so toggles reflect actual behaviour on first open; keys matching defaults are stripped on emit to keep YAML minimal. When a config entry manages exactly one cover and config.cover is unset, the editor auto-fills the cover entity.

  • acp-tile-badge (src/components/tile-badge.ts) — pill-shaped status badge whose kind (auto, manual, custom_position, sun, motion, force, cloud, off) is derived from the integration's pipeline winner. Manual badges show the override end time as a clock; custom-position badges show the slot name or number plus percent. When manualActive is true and the winner is anything other than force or custom_position, the badge renders "Manual" — so a cover mid-override always reflects the override state rather than the underlying pipeline winner.

  • acp-more-info-dialog (src/components/more-info-dialog.ts) — card-rendered dialog opened on tile tap. The header carries the cover icon, entry title, all simultaneously matched handler badges in priority order, icon buttons to the integration's config page and the HA device page, and a close button. The body has the plain-English decision sentence, target position with mismatch indicator, per-cover bars, today's forecast strip, Automatic/Climate/Motion toggle chips, a Resume Auto button, and a collapsible Advanced section embedding acp-sky-compass, acp-decision-strip, acp-overrides-panel, and acp-climate-panel.

  • acp-forecast-strip (src/components/forecast-strip.ts) — hand-written SVG strip rendering the integration's position_forecast sensor data as a position curve with colour-coded boundary event markers (sunrise, sunset, fov_enter, fov_exit). Hover affordances: moving the pointer across the curve snaps to the nearest sample and shows a follow-along label with time, position percentage, and handler name; a dashed vertical guide line and a dot on the curve track the snapped point. Event lines show a human-readable description plus local time in their tooltip (e.g. "Sun enters window field of view — 09:42") with a widened 12px hit area. Axis labels annotate 100% in the top-left corner and start/end clock times along the bottom edge. No charting library; scales to fit its container.

  • buildDecisionSentence (src/lib/decision-summary.ts) — helper that walks matched handlers in reverse priority order and produces a human-readable pipeline sentence ending at the winner. Custom-position rows render the sensor's friendly name when available, fall back to #N, and append floor only when minimum-mode is actively constraining. Used by both the dialog and the decision strip.

  • resolveCustomPositionPct (src/lib/decision-summary.ts) — computes the effective resolved position for min_mode custom-position rules, where the rule's position field is a floor the cover should not go below rather than a target. The badge in src/adaptive-cover-pro-tile-card.ts and the dialog badge in src/components/more-info-dialog.ts both call this helper.

  • pickCoverIcon (src/lib/icons.ts) — selects open/partial/closed MDI icon variants based on live cover position, using a 5/95 deadband to prevent flicker near the rails.

  • t() translation helper (src/lib/i18n.ts) — resolves a dot-separated key against a locale table, interpolates {placeholder} tokens, and falls back to the EN table when a key is missing in the active locale. Locale is read from hass.locale.language then hass.language, normalised to a BCP-47 base tag (e.g. fr-CAfr).

  • EN and FR string tables (src/lib/i18n/en.ts, src/lib/i18n/fr.ts) — en.ts is the canonical source-of-truth for every user-visible string. The French translation has been reviewed by a native speaker.

  • device_id in DiscoveredEntitiesdiscoverEntities now captures the first device_id found on a matched entity registry entry and exposes it as DiscoveredEntities.device_id, used by the dialog's HA device page button.

  • formatCoverState (src/lib/formatters.ts) — renders the localized cover state ("Open", "Closed", "Opening", etc.) using hass.formatEntityState when available, falling back to the standard cover translation key.

Changed

  • Every card surface uses t() for UI strings — all components in src/components/, both card roots, and both editors pass through the translation helper rather than inlining English literals. The EN table ensures existing behaviour is unchanged when HA's language is English or unsupported.

  • Position writes route through adaptive_cover_pro.set_position — the tile card's open and close buttons (formerly cover.open_cover / cover.close_cover) now call adaptive_cover_pro.set_position with position: 100 and position: 0 respectively via _setCoverPosition in src/adaptive-cover-pro-tile-card.ts. The cover bar's drag-to-set path in src/components/cover-bar.ts changed the same way, replacing cover.set_cover_position. This prevents the integration's adaptive loop from immediately overriding a manual position write with a competing cover service call. (#67, #70)

  • Stop routes through adaptive_cover_pro.stop_stopCover in src/adaptive-cover-pro-tile-card.ts previously called cover.stop_cover; it now calls adaptive_cover_pro.stop. This completes the service-routing work so every tile-card action — open, close, slider, and stop — is recognized as ACP-originated when manual_ignore_external mode is on. (#71)

  • set_position and stop pass entity_id via target, not service datacallService calls for adaptive_cover_pro set_position and stop now pass entity_id as the dedicated HA target argument: callService('adaptive_cover_pro', 'set_position', { position }, { entity_id }). This matches HA's standard service-call shape and resolves cases where newer HA cores rejected the data-payload form. Applied in both src/adaptive-cover-pro-tile-card.ts and src/components/cover-bar.ts. (#76, #78)

  • acp-decision-strip decision summary line — the strip now renders the plain-English buildDecisionSentence output above its handler row grid, gated by show_decision_summary (defaults true). normalizeHandler is extracted to src/lib/decision-summary and re-imported, so the strip and the sentence helper share one normalisation path. Multi-slot installs aggregate correctly because per-slot custom_position_<N> handler names collapse to custom_position.

  • layout: 'two-line' renamed to layout: 'detailed' — the two-line layout option introduced in beta.1 is replaced by detailed, which puts the entry title on row 1, state · position and the ↑■↓ controls on row 2, and the contextual badge on a collapsible row 3. The layout type in AdaptiveCoverProTileCardConfig is now 'one-line' | 'detailed'. If you configured layout: two-line during the beta, update it to layout: detailed.

  • Control buttons use ha-icon — the tile card's control buttons now use mdi:arrow-up, mdi:stop, and mdi:arrow-down ha-icon elements sized to match HA's native tile-card buttons, replacing the earlier unicode glyphs.

  • custom_position badge drops the "Custom ·" prefix for named slots — when a slot name is set, acp-tile-badge renders the slot name alone (e.g. "Table extension") instead of "Custom · Table extension". The custom_position purple color signals the kind; the prefix was redundant. Unnamed slots still render "Custom #N".

Fixed

  • Tile card shows real cover position while a manual override is active — the rendered position label was reading from the integration's cover_position sensor (the calculated target), not from the cover entity's live current_position attribute. A new _liveCoverPosition lookup in src/adaptive-cover-pro-tile-card.ts now takes priority for the display value. (#73)

  • "Manual" badge appears whenever an override is active, regardless of pipeline winner — the badge previously derived its label purely from the decision-trace winner, showing a solar or custom-position chip even when manual_override was active. TileBadge now accepts a manualActive property; when true and the winner is not force or custom_position, the badge renders "Manual". (#73)

  • Badge shows effective position instead of floor for min_mode custom-position rules — for custom-position rules with min_mode: true, the rule's position field is a floor the cover should not go below; the actual settled position is the larger of that floor and any prior pipeline result. Both badges previously rendered the raw floor value; both now call resolveCustomPositionPct from src/lib/decision-summary.ts. (#77, #79)

  • Badge shows the custom-position chip, not the override timer, when both are active simultaneouslyTileBadge._kind previously rendered the Manual timer pill whenever manualActive was true. It now excludes both force and custom_position winners from the Manual override path, so a cover with an active override that lands on a custom-position rule shows the custom-position chip rather than the timer. (#82)

  • Resume button hides when custom_position is the winner but no override is active_shouldShowResume in src/adaptive-cover-pro-tile-card.ts no longer treats a custom_position winner alone as a reason to show Resume; it now requires _manualOverrideOn(discovered) to be true. Previously, after pressing Resume on a custom-position cover, the override cleared but the winner stayed custom_position_N, leaving Resume visible. (#81)

  • Forecast strip event tooltip was the raw label field — tooltips now show the kind's plain-English meaning resolved through EVENT_KIND_MEANINGS in src/components/forecast-strip.ts, falling back to the raw label only when the kind is unrecognised.

  • More-info dialog Resume gating — Resume Auto is hidden unless manual override is on or the winner is a custom-position slot, matching the tile's inline rule.

Upgrading

From v1.7.1 (stable): bump the Lovelace resource URL query string to ?v=2.0.0. HA caches ES module URLs aggressively — changing the query string is the only reliable way to force a re-fetch; a hard-refresh alone does not invalidate cached modules.

From a 2.0.0 beta config: if you wrote layout: two-line in any tile card YAML during beta.1, rename it to layout: detailed — the old key is no longer recognized.

No other YAML migration is needed. All new config keys have defaults that preserve the pre-upgrade behaviour on first load.

Compatibility

  • Home Assistant 2024.1+
  • Adaptive Cover Pro integration v2.22.1-beta.3 or newer required — the card depends on integration-side services (adaptive_cover_pro.set_position, adaptive_cover_pro.stop), entities, and attributes introduced in that integration release.