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
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