Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #17 from kvanhoorn/master
Browse files Browse the repository at this point in the history
added brewery as attribute to latest checkin
  • Loading branch information
swetoast committed Feb 7, 2019
2 parents 5842a6d + bb69215 commit 5e02996
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Untappd

[![Version](https://img.shields.io/badge/version-0.1.1-green.svg?style=for-the-badge)](#) [![mantained](https://img.shields.io/maintenance/yes/2019.svg?style=for-the-badge)](#)
[![Version](https://img.shields.io/badge/version-0.1.3-green.svg?style=for-the-badge)](#) [![mantained](https://img.shields.io/maintenance/yes/2019.svg?style=for-the-badge)](#)

[![maintainer](https://img.shields.io/badge/maintainer-Peter%20Skopa%20%40swetoast-blue.svg?style=for-the-badge)](#) [![maintainer](https://img.shields.io/badge/maintainer-Ian%20Richardson%20%40iantrich-blue.svg?style=for-the-badge)](#)

Expand Down
5 changes: 4 additions & 1 deletion custom_components/untappd/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

REQUIREMENTS = ['pyuntappd==0.0.5']

__version__ = '0.1.2'
__version__ = '0.1.3'

_LOGGER = logging.getLogger(__name__)

Expand All @@ -30,6 +30,7 @@

ATTR_ABV = 'abv'
ATTR_BEER = 'beer'
ATTR_BREWERY = 'brewery'
ATTR_SCORE = 'score'
ATTR_TOTAL_BADGES = 'total_badges'
ATTR_TOTAL_BEERS = 'total_beers'
Expand Down Expand Up @@ -98,6 +99,7 @@ def update(self):

self._state = relative_checkin_date
self._beer = result['beer']['beer_name']
self._brewery = result['brewery']['brewery_name']
self._score = str(result['rating_score'])
self._picture = result['beer']['beer_label']
self._abv = str(result['beer']['beer_abv']) + '%'
Expand Down Expand Up @@ -135,6 +137,7 @@ def device_state_attributes(self):
return {
ATTR_ABV: self._abv,
ATTR_BEER: self._beer,
ATTR_BREWERY: self._brewery,
ATTR_SCORE: self._score,
ATTR_TOTAL_BADGES: self._total_badges,
ATTR_TOTAL_BEERS: self._total_beers,
Expand Down

0 comments on commit 5e02996

Please sign in to comment.