Applies the change's delta specs to the main specs and files the change
under openspec/changes/archive/2026-09-16-scoped-beer-override.
keg-auto-detection gains the scoped-override and override-visibility
requirements, and its detection precedence is rewritten so no config
value can precede detection except by matching the reported product ID.
card-config drops the beer_name override requirement in favour of the
beer_overrides map, and records beer_name alongside beer_entity as an
ignored legacy key.
Also corrects three stale beer_name references in beer-catalog and
beer-label. The proposal's capability list missed those two specs; the
substance of their requirements is unchanged, only the key name they
name, so this is a naming correction rather than a requirement change.
Co-authored-by: Cursor <cursoragent@cursor.com>
Replaces the global beer_name override with beer_overrides, a map keyed
by the product ID the integration reports. An entry applies only while
that keg is tapped, so a correction retires itself on a keg swap — which
matters because a card cannot rewrite its own config and so could never
prune a stale entry.
beer_name is now ignored, joining beer_entity. That is what fixes the
reported symptom: cards configured before 0.3.0 all carry the key,
because the editor of that era always wrote it and getStubConfig seeded
it, and 0.3.1 promoted those dormant values into permanent overrides.
No migration is possible, since the old value records no product ID.
An applied override is now marked on the card with the name detection
resolved, so it can never be mistaken for a detection result. The editor
records corrections against the currently tapped keg and lists saved
entries so leftovers are visible and removable.
Verified against the built bundle in a browser with stubbed hass data:
the reported case, the keg-swap recurrence, unrecognised IDs, the no-keg
state, all five layouts, and a 0.4.0 config loading on the 0.3.1 bundle.
Co-authored-by: Cursor <cursoragent@cursor.com>
The beer_name override reinstated in 0.3.1 has no link to the keg it
corrects, so it outlives it. Every card configured before 0.3.0 carries
the key (the editor of that era always wrote it, getStubConfig seeded
it), which 0.3.1 promoted into a silent permanent override — reported as
a card showing Leffe Blonde while the machine reported Leffe Ruby. The
same failure recurs on any keg swap even without legacy config.
Proposes beer_overrides keyed by product ID, so a correction expires
structurally rather than needing a write the card cannot make, plus a
visible marker when an override is applied. beer_name joins beer_entity
as an ignored key.
Co-authored-by: Cursor <cursoragent@cursor.com>
openspec/specs/ had been empty since the project started: all three changes
were left active and unsynced, so there was no consolidated statement of how
the card is meant to behave.
Synced in dependency order -- perfectdraft-card, then card-layouts-and-imagery,
then auto-detect-gap-closure -- so the MODIFIED and REMOVED operations in the
last one had the base requirements they refer to. Result is 10 capability
specs holding 57 requirements, all validating.
Fixed a contradiction the merge exposed: card-layouts still required a beer
selection dialog reachable from every layout, which auto-detect-gap-closure
had removed. Its interaction scenario now covers the glass dialog only, plus
a scenario tying beer display to the keg-auto-detection rules.
Note the archived tasks.md files retain their unchecked items -- the three
hardware verification tasks in auto-detect-gap-closure, and pre-existing
incomplete tasks in the two older changes.
Co-authored-by: Cursor <cursoragent@cursor.com>
setConfig cached entity IDs for the first device it saw and never cleared
them, so picking a different device in the editor left the card reading the
previous device's sensors. Pre-existing, but _resolveEntities now stops
scanning once the full set is found, which made it easier to hit.
Surfaced by review of the auto-detect-gap-closure changes.
Co-authored-by: Cursor <cursoragent@cursor.com>
Implements openspec/changes/auto-detect-gap-closure.
Catalog now covers all 114 product IDs the integration can report (was 57).
22 IDs mapped onto existing entries, unlocking 20 keg photos that already
shipped but were unreachable; 36 new entries added for beers the card did
not know. Product ID 48061 was mapped to the wrong beer -- it is Northern
Monk Faith, not A Little Faith -- so it now has its own entry.
Detection precedence is explicit: beer_name override, then product ID, then
reported keg name, then an honest no-keg state. Removes the fallback that
displayed Leffe Blonde whenever detection failed, and prefers the card's
curated name over the integration's product-listing name (12 labels).
beer_name returns as an optional override, empty by default, which also
un-orphans custom_beers. Cards on integrations without the keg sensors now
get told to update rather than shown a wrong beer. _resolveEntities no
longer latches on temperature alone.
Adds npm run check:catalog to catch upstream catalog drift, the root cause
of the original gap.
Hardware verification (tasks 8.1-8.3) still outstanding.
Co-authored-by: Cursor <cursoragent@cursor.com>
Follow-up to PR #1 (d0748e7), which landed auto-detection but covers only
57 of the integration's 114 product IDs and falls back to displaying Leffe
Blonde when detection fails.
Artifacts: proposal, design, four capability specs (keg-auto-detection
new; beer-catalog, beer-label, card-config modified), tasks. Includes a
hand-verified product ID mapping for all 57 unmapped kegs.
Co-authored-by: Cursor <cursoragent@cursor.com>
Spec-driven change `perfectdraft-card` with proposal, design, 7 capability
specs (card-core, beer-catalog, keg-display, beer-label, freshness-warning,
card-config, hacs-packaging), and 57 implementation tasks.
Custom Lovelace card for the PerfectDraft Pro HA integration, optimised
for Sonoff NSPanel Pro 120 in landscape mode.
Made-with: Cursor