Skip to content

Add bundled Lovelace card and per-zone control switch - #7

Merged
vfilby merged 1 commit into
mainfrom
worktree-lovelace-card
Aug 19, 2026
Merged

Add bundled Lovelace card and per-zone control switch#7
vfilby merged 1 commit into
mainfrom
worktree-lovelace-card

Conversation

@vfilby

@vfilby vfilby commented Aug 19, 2026

Copy link
Copy Markdown
Owner

What

Bundled dashboard card. The integration now ships custom:shade-engine-card and serves + registers it as a frontend resource automatically (static path /shade_engine/shade-engine-card.js + add_extra_js_url, cache-busted by version). Minimal config:

type: custom:shade-engine-card
entity: sensor.kitchen_shade_target   # or: zone: kitchen

Per zone it shows target / current / glare positions, mode chips (tap to switch), sun-in-window, a manual-hold banner with a live countdown and Release button, a Hold button, a last-decision badge, and the new control toggle. Vanilla web component — no build step, no external deps, themed via HA CSS vars, listed in the card picker.

Per-zone on/off: switch.<zone>_shade_control. A hard gate with no expiry that restores across restarts. While off: new disabled decision reason (respected even by forced evaluations and taking precedence over holds), and manual moves are adopted as baseline without starting a hold. Re-enabling reconciles immediately (bypassing rate limit, never a hold).

Supporting changes. Target sensor gains zone_id, covers, enabled attributes (the card anchors on one entity and derives its siblings); simulator's core.py JS port kept in sync; README documents the card, switch, and new attributes; version 0.4.0; manifest gains frontend/http dependencies.

Tests

5 new pure-core tests for the disabled gate (never commands even forced, precedence over hold, re-enable converges, manual-move-while-off adopts without hold, baseline seeding). 33 pass.

🤖 Generated with Claude Code

The integration now serves its own dashboard card
(custom:shade-engine-card) from /shade_engine/shade-engine-card.js and
auto-registers it as a frontend resource — no manual resource setup. The
card shows target/current/glare positions, tap-to-switch mode chips, a
sun-in-window indicator, a manual-hold banner with live countdown and
Release button, a Hold button, and the new control toggle.

New switch.<zone>_shade_control is a hard per-zone gate: while off the
engine never commands the covers (a new 'disabled' decision reason that
even forced evaluations respect), manual moves are adopted as baseline
without starting a hold, and the state restores across restarts.
Re-enabling reconciles immediately.

The target sensor now exposes zone_id, covers, and enabled attributes so
the card can anchor everything to one entity. Simulator's core.py port
kept in sync. Version 0.4.0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vfilby
vfilby merged commit 78521db into main Aug 19, 2026
3 checks passed
@vfilby
vfilby deleted the worktree-lovelace-card branch August 19, 2026 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant