Perfect draft integration

Hi any luck with this yet i am still getting the same error code when trying to add integration

Me too, my PerfectDraft just arrived and saw this intergration being worked on

My ip address has been blocked by perfect Draft Api… Hard to move on the tests. For others would like to try, be careful to your ip.

Looks like ive run into the same problem as @zolric my IP is being banned by the API

Do we have any updates on this one? Happy to help get this one over the line, this is the one integration I’m really looking forward to!

1 Like

Any more on this? Great work so far, shame ip is being blocked.
I spoke to one of their team recently who said they hadnt at this stage considered much home integration beyond the app but can definitely see the potential.
Maybe them blocking stuff is a good sign that they are slowly developing their own things in the background? (:grimacing: hopeful)

Nah they just subscribe to a security service from a company called Imperva and it blocks you automatically if it sees too many requests that don’t make sense.

Hello
this integration is ok?

I have made a working integration from scratch, using some of the hints found in this thread.

Or rather, Claude Code made it through relentless hammering at the problem for well over ten hours (check the extensive DISCOVERY.md!).

Regardless, there’s now a working PerfectDraft Pro integration. Add as custom repo to HACS.

I’m sure there are things to be fixed. But this comes online immediately and reports values. You need to enter your PerfectDraft email, password, and generate a token once (a 30-second procedure that is well documented step by step) to install.

This integration (mine) correctly detects insertion of a new keg and resets the (integration’s) freshness timer to 30 days. Just inserted a new keg and it works.

Now also with a companion card that displays the current beer, the temperature, and how many glasses are left. Beer selection and glass sizes configurable. Alerts on freshness expiry approaching.

1 Like

Glad to see my API reverse engineering was finally useful!

1 Like

This is really great. Thanks @Falkvinge for sharing this. My unit does not seem to change the Mode, it always stays as standard, does your change? Would there be any way of adding an extra sensor to let the user know how many litres/pints are left in the Keg (like the apps displays)? Thanks

1 Like

My Card is being cut off, is there any way of resosolving that?

1 Like

There’s already a “percent left” sensor in the integration which the card uses (“Keg Remaining” in the screenshot above). You can multiply this by the six-liter contents of a PerfectDraft keg, it will give you the volume remaining. This is how the card works (and then it divides that by the glass volume to get the remaining glass count).

I have not changed the Mode, so I haven’t tested that part. Does it change in the app? The integration should be showing the same data as the app.

I will see if there’s easy changes to be made to accommodate other screen sizes for the card. What is the display you are using, or the format of your card? I made it for myself first, so every new user will have a new size/display requirement, and eventually, it’ll be flexible enough, I guess?

Thanks for the follow up. The mode was changing in the app but just not in HA. The screenshot was taken from my the standard Sidebar dash in HA, but using the iOS app it works great. One thing I haven’t been able to get working is the beer keg image. Are you able to show me how you how you have done it on the Leffe Blonde keg image? Thanks

The integration is polling the PerfectDraft API, so seeing a mode change can take up to whatever polling interval in seconds you have set. Default is 900 (15 minutes), there’s a service call to change it (minimum 60 seconds).

To avoid IP bans, I have an automation that tightens the polling interval to 60 seconds when I have friends over and drink beer, and then raises it back to 15 minutes when they leave.

The beer keg images were collected as product images from various stores (copyright case law permits this clearly for product images when they are used to refer to the product); not all images were available. For example, Leffe Noël / Leffe Winter isn’t in season at the moment. More images will be added as they simply come back into season.

Would it be possible to add the image for Stella
Artois Unfiltered? Thanks

1 Like

I am adding significantly more display options at this time, which should address your card's min-width being larger than your viewport. Release within the hour. Also looking for more keg images.

New releases of the integration and card:

What's new

Better keg replacement detection

The integration previously used a reset of the pour count as keg change indication. Turns out that unplugging the PerfectDraft also resets the pour count. New detection is based on remaining volume in the keg instead (when the volume increases by 3L or more, this is interpreted as a keg change).

There is also a manual "I changed the keg" button now if the autodetect doesn't trigger.

Five layouts in the card

Choose how the card displays via the new Layout option (visual editor, or layout: in YAML). Defaults to landscape, so existing cards are unchanged.

  • landscape – the original two-zone view (NSPanel Pro, wide cards)
  • portrait – stacked label over grid, for phones and narrow columns
  • compact – a single row with a remaining-beer bar, for dense dashboards
  • hero – full-bleed keg photo with status overlaid
  • vessel – a single glass that fills to show how much is left

Fits narrow cards

The emoji grid is now width-tolerant — it shrinks to fit instead of overflowing/cropping on narrow placements. New advanced options: matrix_columns (auto or a fixed count) and max_matrix_width.

Richer beer imagery

  • 16 new keg photos: BrewDog Punk IPA & Elvis Juice, Tiny Rebel Clwb Tropicana, Thornbridge Jaipur, Fuller's London Pride, Theakston Old Peculier, Peroni, Diebels, Haake-Beck, La Virgen, Stella Artois Unfiltered, Bud Light, Tennent's, Leffe Ambrée, Hertog Jan Grand, and Castelain Ch'ti. 68 catalog beers now have real keg shots.
  • Smart fallback: beers without a photo now render a brand-tinted keg silhouette with their initial, instead of a bare letter.
  • All keg images re-encoded to WebP — download size dropped from ~19 MB to ~2 MB.

Upgrade notes

No configuration changes required — landscape is the default and existing installs look identical. All new options are opt-in.

Five layouts

Choose how the card displays via the new Layout option (visual editor, or layout: in YAML). Defaults to landscape, so existing cards are unchanged.

  • landscape – the original two-zone view (NSPanel Pro, wide cards)
  • portrait – stacked label over grid, for phones and narrow columns
  • compact – a single row with a remaining-beer bar, for dense dashboards
  • hero – full-bleed keg photo with status overlaid
  • vessel – a single glass that fills to show how much is left

Fits narrow cards

The emoji grid is now width-tolerant — it shrinks to fit instead of overflowing/cropping on narrow placements. New advanced options: matrix_columns (auto or a fixed count) and max_matrix_width.

Richer beer imagery

  • 16 new keg photos: BrewDog Punk IPA & Elvis Juice, Tiny Rebel Clwb Tropicana, Thornbridge Jaipur, Fuller's London Pride, Theakston Old Peculier, Peroni, Diebels, Haake-Beck, La Virgen, Stella Artois Unfiltered, Bud Light, Tennent's, Leffe Ambrée, Hertog Jan Grand, and Castelain Ch'ti. 68 catalog beers now have real keg shots.
  • Smart fallback: beers without a photo now render a brand-tinted keg silhouette with their initial, instead of a bare letter.
  • All keg images re-encoded to WebP — download size dropped from ~19 MB to ~2 MB.

Upgrade notes

No configuration changes required — landscape is the default and existing installs look identical. All new options are opt-in.

Installs through HACS

The releases have been pushed to GitHub and if you installed through HACS, they will be picked up in a day (HACS checks every 24h by default).