Untappd API

would love to see widgets for untappd, there is much documentation and libraries are available so if any kind hearted developer would love to take this on it would be most kind :smile:

https://untappd.com/api/docs

Iā€™m interested! What sort of functionality would you expect in HASS?

1 Like

I think it pretty easy to create a sensor for the information you need, its probably returned in json so just need to parse it.

Basically sensors for unique beers and total beer stats and a away to check the wish list wanted beers on account.

If sensor.beer_count == 100 then message user congrats on 100 beers :stuck_out_tongue:

already way past 100 :wink:

A beer API, how bloody amazing!!

1 Like

image

the quest has begun for automating beers :stuck_out_tongue:

Lovelace updates


along with a custom beer card from @ciotlosm
image

1 Like

Iā€™m also checking this out, can you maybe share the code? I have my own client_id and client_secret but doing this by seperate api calls. Not sure if this can be done easier?

Also there is a hourly limit on the API can i make sure HA is limiting the api calls?

not yet working on it will post once i got the code more cleaned up

For anyone following this thread: https://github.com/custom-components/sensor.untapped

1 Like

How did you create the Beer card with the Untappd Image, Unique / Total / Photoā€™s ? Do you have the config somewhere? Iā€™m interested in how this was setup

Will post it later some day on https://sharethelove.io

1 Like

https://sharethelove.io/cards/untappd-card

here is my new card

1 Like

Iā€™ve been trying to get an automation setup to send me a ā€˜Cheersā€™ notification listing the last beer I had and the rating. Iā€™ve got it to mostly work, but it keeps reporting the beer I had previously, not the current beer. Any guidance to fix it would be appreciated.

automation:
  - alias: Cheers
    initial_state: 'on'
    trigger:
      platform: state
      entity_id: sensor.untappd_last_checkin_username
    condition:
      condition: state
      entity_id: sensor.untappd_last_checkin_username
      state: Today
    action:
      - service: notify.sms_notify
        data_template:
          message: "Cheers! {{ trigger.from_state.attributes.beer }} was just rated a {{ trigger.from_state.attributes.score }} "

Will take alook at the api some day when i got some time over feel free to open an issue on the custom component tracker so i dont forget

I just figured it out. I had my data template wrong. Hereā€™s the corrected code for everyoneā€™s reference.

automation:
  - alias: Cheers
    initial_state: 'on'
    trigger:
      platform: state
      entity_id: sensor.untappd_last_checkin_username
    condition:
      condition: state
      entity_id: sensor.untappd_last_checkin_username
      state: Today
    action:
      - delay: '00:01:30'
      - service: notify.sms_notify
        data_template:
          message: "Cheers! {{ states.sensor.untappd_last_checkin_username.attributes.beer }} was just rated a {{ states.sensor.untappd_last_checkin_username.attributes.score }} "
2 Likes

I tried adding the card from ā€œshare the loveā€ and first off it didnā€™t work until I noticed a change. In the example there it says checkin in the sensors but now itā€™s spelled check_in so now itā€™s working.
Only thing I donā€™t understand (lovelace n00b) is how to get the icons in the bottom row?
This is how it looks right now:
image

The templating for example the checkins is "{{ states.sensor.untappd_last_check_in_naesstrom.attributes.checkins }}" and running that in the template tool in hass I get ā€œ16ā€ so I have no clue where the ā€œcheckinsā€ text is coming from or how to remove it?

That is from the unit_of_measurement in the template sensor.