Issue #8: keg artwork for Löwenbräu (29745) and Spaten (33918) Oktoberfestbier on the card, and the integration's 29745 name spelled with umlauts. Joint 0.4.5 release.
Co-authored-by: Cursor <cursoragent@cursor.com>
Catalog 48180 (Camden Stout, issue #9) in the integration and companion card, landing PR #10 and card PR #2 with the contributor credited; ships in the joint v0.3.5 / v0.4.3 release.
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign in via Cognito InitiateAuth with the domain ClientMetadata PerfectDraft's PreAuthentication Lambda now requires (#11), and surface the server's rejection reason in the config flow.
Co-authored-by: Cursor <cursoragent@cursor.com>
Ratchet the keg catalog floor to 115 to match the shipped 0.3.3
catalog. Archive the change that added Anheuser-Busch Bud (48050).
Co-authored-by: Cursor <cursoragent@cursor.com>
Syncs the delta into openspec/specs/entities/spec.md, retrofitting the
Keg name sensor and Keg product ID sensor requirements that PR #2 shipped
without ever updating the spec, and adding both to the entity-name
translations scenario.
Note that openspec validate --specs still fails on all five spec files
for a missing "## Purpose" section. That is pre-existing and repo-wide,
not caused by this sync — verified by stashing the change and re-running.
Left alone rather than fixed across five files here.
PROJECT_HYGIENE learnings, three of them found while doing this work:
- Never add a non-numeric key to keg_catalog.json. The loader's
{int(k): v ...} raises on it and the except clause returns an empty
dict, so the whole catalog dies silently at debug level. This is a
trap precisely because embedding provenance in that file is the
obvious next idea.
- test_harness.py is stale: it reads a user_id key that
.credentials.json no longer has, so it exits immediately.
- All five openspec/specs files already fail validation, so a failing
spec validation does not imply you broke something.
Group 5 (on-device) is recorded as verification debt rather than marked
done. The catalog was replaced wholesale and verified statically only;
the live resolve path is unexercised because no HA is reachable from the
dev host and the harness refresh token has expired. v0.3.2 exists so
that check can happen through HACS.
Implementation is on agent/backport-keg-catalog. Groups 1-4 and 6.1-6.3
are done; group 5 (on-device) is blocked on the repo owner and the reason
is recorded in tasks.md.
Two artifact corrections that came out of the apply phase:
design.md now cherry-picks Brett's commit instead of copying the file.
The original decision rejected a cherry-pick on the assumption that the
pre-v0.1 merge-base would make it conflict. Wrong: 0982d20 touches one
file, and that file at 0982d20^ is byte-identical to master's, so only
the touched blob has to match and it applies clean. This is the better
option anyway — copying would have landed 28 observed keg names under the
committer's name with the author erased, whereas the cherry-pick keeps
Brett as author and carries the commit message that documents the
provenance and each of the four corrections.
design.md also records a trap found while writing the tests, because it
invalidates the provenance-marker idea the risks section suggested:
_load_keg_catalog builds {int(k): v ...} and catches ValueError by
returning {}, so adding a "_meta" or "_source" key to the catalog would
disable it entirely and leave every keg with no name, logged only at
debug level. Embedding metadata requires changing the loader first.
Temperature sensor requirement now mandates rejecting out-of-range
firmware sentinels and reporting no value, with scenarios covering the
-128 case, the fallback chain, and non-numeric input.
Co-authored-by: Cursor <cursoragent@cursor.com>
Implementation complete on agent/temperature-sentinel (133f708).
Sections 1-3 done, 4.1 and 4.3 done; 4.2 and 4.4 are public-repo
actions held for maintainer go-ahead.
Co-authored-by: Cursor <cursoragent@cursor.com>
Sentinel temperature readings (-128, i.e. 0x80 as signed int8) from an
uninitialised probe are reported as real measurements and pollute
recorder statistics. Proposal, design, entities delta spec and tasks
for filtering them by plausible range.
Refs: Falkvinge/hassio-integration-perfectdraft-pro#4
Co-authored-by: Cursor <cursoragent@cursor.com>
Investigation of @brettjenkins' fork found exactly one substantive
difference from master in custom_components/: the keg name catalog, 86
entries against the fork's 114. keg_detection.py, sensor.py,
coordinator.py, api.py and const.py are byte-identical, and the
config_flow.py and translation differences are the fork lacking our
September reauth work. GitHub's "38 ahead / 46 behind" is an artifact of
the mirror's rewritten history — the merge-base predates v0.1.
The 28 missing IDs are kegs the PerfectDraft app can select, so they
render as a blank Keg sensor today. Four names we do ship are wrong
rather than merely styled differently, including one beer that no longer
exists under that name.
The change also retrofits the entities requirements for the Keg and Keg
Product sensors, which PR #2 shipped without touching
openspec/specs/entities/spec.md. That gap has to close here because the
catalog requirement has nothing to attach to otherwise.
Explicitly out of scope: the fork's hacs.json without the 2024.11.0
floor (that floor is ours, added by 0f3b4c2), the fork's 0.4.1 version
(0f3b4c2 renumbered to 0.3.1 deliberately), and changing what an
unmapped ID reports.
Co-authored-by: Cursor <cursoragent@cursor.com>
Archived to openspec/changes/archive/2026-09-06-fix-reauth-flow.
Reauth confirmed working on the live machine running v0.3.1; three
non-blocking on-device checks archived unverified with reasons
recorded, and the keg-dependent one carried forward in
PROJECT_HYGIENE.md.
Co-authored-by: Cursor <cursoragent@cursor.com>
Reauth itself confirmed live on v0.3.1. Tasks 6.6, 6.7 and 8.8 archived
unverified: no keg was fitted, so there was no freshness baseline to
check, and the other two are cosmetic dialog-rendering checks already
covered by tests. The keg-dependent check is carried into
PROJECT_HYGIENE.md as verification debt for the next keg change.
Co-authored-by: Cursor <cursoragent@cursor.com>
Live instance running the v0.3.1 release build: the reauth repair
appeared and the flow completed on "Re-authentication successful"
rather than the "already configured" dead-end. Tasks 6.4 and 6.5 done;
6.6 (polling/history/freshness baseline), 6.7 and 8.8 still open.
Co-authored-by: Cursor <cursoragent@cursor.com>
Records section 8 (the already_in_progress finding and its fix) and
renames the translation requirement to cover every abort reason, with
scenarios for the concurrent-flow path and source-derived enumeration.
Co-authored-by: Cursor <cursoragent@cursor.com>
Marks sections 1-5 and the automated verification in 6 done, syncs the
config-flow delta into the main specs, and records the deferred
Cognito-token-persistence item in PROJECT_HYGIENE.md.
Archive (7.5/7.6) is deliberately held until on-device verification
(6.4-6.7) confirms the fix against the live machine.
Co-authored-by: Cursor <cursoragent@cursor.com>
Reauth aborts with already_configured because async_step_token calls
_abort_if_unique_id_configured() on every source, including reauth where
a matching unique ID is the expected condition. Fresh tokens are discarded
and the entry stays broken.
Artifacts cover the source-aware fix, the 2024.11 core floor the reauth
helpers require, and the pytest-homeassistant-custom-component harness
needed to regression-test a config flow.
Co-authored-by: Cursor <cursoragent@cursor.com>
Task 5.3 confirmed on-device (Mark Keg Changed button and volume-jump
detection both work). Applied the entities delta to the main spec: the
keg freshness sensor now documents the volume-jump triggers and
last_volume restore, plus the new Manual keg-change button requirement.
Co-authored-by: Cursor <cursoragent@cursor.com>
Propose smarter keg-change detection plus a manual override.
Detection gains two volume-based triggers (refill to near-full;
>=50-point upward jump) so a swap is caught even when pours never
resets to 0 (the swap-then-immediate-pour case). Adds a "Mark Keg
Changed" button as a deterministic fallback.
Co-authored-by: Cursor <cursoragent@cursor.com>
Critical fix:
- Cognito refresh now parses response with content_type=None
(was crashing after 1hr when access token expired)
HACS compliance:
- Added README.md with full setup instructions including the
token generation command
- Fixed manifest.json URLs to point at actual repo
- Version bumped to 0.2.0
Brand:
- Added brand/icon.png (PerfectDraft glass icon from official app)
New sensor:
- Keg Freshness: 30-day countdown from keg insertion, detected
via numberOfPoursSinceStartup reset + kegVolume near full,
persisted across restarts via RestoreEntity
Polish:
- Fixed MALFORMED_ARGUMENT in token step description
- Cleaner description referencing README for instructions
Made-with: Cursor
Scaffolds the repo with agent workflow config (AGENTS.md, .gitignore),
openspec tooling, and the perfectdraft-integration change proposal
with design, specs (api-client, config-flow, entities, hacs-packaging),
and implementation tasks — ready for apply phase.
Made-with: Cursor