Skip to content

Commit

Permalink
Upgrade gitterpy to 0.1.6 (#9983)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabaff committed Oct 20, 2017
1 parent 4f1eab1 commit aab7442
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions homeassistant/components/sensor/gitter.py
Expand Up @@ -13,7 +13,7 @@
from homeassistant.const import CONF_NAME, CONF_API_KEY
from homeassistant.helpers.entity import Entity

REQUIREMENTS = ['gitterpy==0.1.5']
REQUIREMENTS = ['gitterpy==0.1.6']

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -99,5 +99,8 @@ def icon(self):
def update(self):
"""Get the latest data and updates the state."""
data = self._data.user.unread_items(self._room)
self._mention = len(data['mention'])
self._state = len(data['chat'])
if 'error' not in data.keys():
self._mention = len(data['mention'])
self._state = len(data['chat'])
else:
_LOGGER.error("Not joined: %s", self._room)
2 changes: 1 addition & 1 deletion requirements_all.txt
Expand Up @@ -277,7 +277,7 @@ gTTS-token==1.1.1
# gattlib==0.20150805

# homeassistant.components.sensor.gitter
gitterpy==0.1.5
gitterpy==0.1.6

# homeassistant.components.notify.gntp
gntp==1.0.3
Expand Down

0 comments on commit aab7442

Please sign in to comment.