6 Commits
Author SHA1 Message Date
rickandCursor 1452620f0a Invalidate resolved entities when the configured device changes
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>
2026-09-09 17:49:08 +02:00
rickandCursor 1d0c014111 Close the auto-detection gaps: full keg ID coverage, honest fallbacks
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>
2026-09-09 17:04:39 +02:00
rickandCursor 2d3c5c0faf Propose auto-detect-gap-closure: complete keg ID coverage and fix detection fallbacks
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>
2026-09-09 16:50:44 +02:00
rickandCursor a2319363d6 Add selectable layouts, tiered fallback art, 16 keg images (v0.2.0)
- Five layouts selectable via `layout` config + editor dropdown:
  landscape (default, unchanged), portrait, compact, hero, vessel
- Width-tolerant emoji matrix: shrinks to fit narrow cards instead of
  overflowing (min-width:0, container-query emoji sizing, min_columns:1).
  Fixes the reported crop on narrow placements.
- New matrix knobs: `matrix_columns` (auto|N) and `max_matrix_width`
- Tiered visual fallback so every beer looks intentional:
  keg photo -> brewery logo -> generated palette-tinted keg silhouette
- 16 new keg photos sourced from regional PerfectDraft stores
  (BrewDog, Tiny Rebel, Thornbridge, Fuller's, Theakston, Peroni,
   Diebels, Haake-Beck, La Virgen, Stella Unfiltered, Bud Light,
   Tennent's, Leffe Ambrée, Hertog Jan Grand, Castelain Ch'ti)
- All keg images re-encoded to WebP @ <=800px: dist/kegs 19MB -> 2.1MB
- OpenSpec change: card-layouts-and-imagery (proposal/design/specs/tasks)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-01 21:09:25 +02:00
rick 73ae584c8b Update task progress: 65/73 tasks complete
Remaining: beer logo images (4.2), GitHub topics (12.5), and
manual testing tasks (11.8, 12.6, 13.2-13.4)

Made-with: Cursor
2026-04-18 18:19:22 +02:00
rick faca00f4ab Initial commit: OpenSpec proposal for PerfectDraft custom card
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
2026-04-18 18:01:48 +02:00