Both entries were mapped by kegId (29745, 33918) but had no imagePath, so the card drew the generated silhouette. Images come from the PerfectDraft DE storefront, encoded to WebP like the existing art (800 px and the native 700 px). The reference snapshot is re-synced to integration commit 1598e7b0, which spells 29745 as Löwenbräu Oktoberfestbier. Issue #8 on the integration repo.
Co-authored-by: Cursor <cursoragent@cursor.com>
Maps integration product ID 48180 to a camden-stout entry next to the
other Camden rows. Artwork is taken unchanged from card PR #2; ABV 4.0%
checked against Camden Town Brewery's own PerfectDraft listing. The
reference snapshot is re-synced to the integration commit that adds the
key (8b2c4418), and the stale lockfile is regenerated.
Co-authored-by: MThomas564 <mattraethomas97@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
The card already had the DE/AT wrap and artwork; the integration now
reports that product ID, so the join can complete. Bump to 0.4.1.
Co-authored-by: Cursor <cursoragent@cursor.com>
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>
The global beer_name override is replaced by beer_overrides keyed by the
product ID it corrects, so a correction cannot outlive its keg. beer_name
is ignored, which returns every card configured before 0.3.0 to
auto-detection. An applied override is marked on the card.
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>
Completes the auto-detection work started in PR #1 by @brettjenkins.
Catalog covers all 114 product IDs the integration can report (was 57),
unlocking 20 keg photos that already shipped but were unreachable. Detection
precedence is explicit, the Leffe Blonde fallback is gone, and beer_name
returns as an optional override. Adds npm run check:catalog to catch upstream
catalog drift.
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>
Consumes the keg_product_id/keg_name sensors added in integration PR #2. Gaps in catalog coverage, label preference, and docs are tracked in the follow-up OpenSpec change 'auto-detect-gap-closure'.
Matches the tapped keg against the integration's product-id sensor
first, falling back to name matching. Adds product-id mappings plus a
Bass catalog entry, and removes the now-redundant manual beer picker
and beer_entity/beer_name config options.
- Wire imagePath for 31 newly downloaded keg product images
- Add Castelain Ch'ti Blonde and Hertog Jan Grand Pilsener entries
- Add onerror fallback on <img> to show letter initial if image fails
- Remove 18 stale placeholder images from dist/kegs/
- Bump CARD_VERSION, EDITOR_VERSION, and package.json to 0.1.6
Made-with: Cursor
64 of 72 images were CDN placeholder JPEGs (10KB each) disguised
as PNGs. Replaced 8 originals with full-resolution versions and
found 13 additional real images using alternate CDN filenames.
Beers without images now fall back to color palette display instead
of showing a broken "Awaiting Image" placeholder.
21 beers with real product images, remainder use brand colors.
Made-with: Cursor
- Grid rows use 1fr to stretch vertically across full zone height
- Each glass is a flex container filling its grid cell
- Emoji font-size: min(7vw, 5em) — roughly 150% of previous
- Grid align-content: stretch instead of center
Made-with: Cursor
- Label zone: 1/4 width (was 1/3), keg zone gets 3/4
- Beer logo: flex-grows to fill space, 80% width
- Temperature: 3em, beer name: 1.6em, count label: 1.3em
- Emoji grid: min(4.5vw, 3.5em) auto-scales to fill zone
- All elements sized up for NSPanel Pro readability
Made-with: Cursor
- Emoji grid now uses CSS Grid with fixed max-glass slots per size
(e.g., 6x3 for 330mL). Empty slots shown as faded greyed-out emojis.
- Added Leffe Noël as alias for Leffe Winter (same beer, French name)
- Bumped editor version to 0.1.2
Made-with: Cursor
Entity IDs don't contain "perfectdraft" — they use the user-chosen
device name (e.g., sensor.balcony_tap_1). The editor and card now
use hass.entities registry to find devices by platform === "perfectdraft"
and resolve sensors by their translation_key (temperature, keg_remaining,
keg_freshness) instead of entity ID suffixes.
Made-with: Cursor
HACS plugin repos need the built JS and assets accessible on the
default branch. Un-ignored dist/ and committed build output:
- dist/perfectdraft-card.js (51KB)
- dist/kegs/*.png (72 keg product images)
Made-with: Cursor
Downloaded all single-keg PerfectDraft product images (nominative use
for product identification). 72 beers across European and US markets.
Card resolves image paths relative to its own install location at
runtime, supporting both HACS and manual install paths.
Made-with: Cursor