Add bundled Lovelace card and per-zone control switch - #7
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Bundled dashboard card. The integration now ships
custom:shade-engine-cardand 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: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: newdisableddecision 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,enabledattributes (the card anchors on one entity and derives its siblings); simulator'score.pyJS port kept in sync; README documents the card, switch, and new attributes; version 0.4.0; manifest gainsfrontend/httpdependencies.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