From f8005153c95b2ffda072e95f1613c3210b8d9616 Mon Sep 17 00:00:00 2001 From: William Scanlon Date: Sat, 25 Mar 2017 10:28:16 -0400 Subject: [PATCH] Fix wink siren (#6775) * Fix siren/switch attributes and update python-wink * Updated requirements_all.txt --- homeassistant/components/switch/wink.py | 8 ++++---- homeassistant/components/wink.py | 2 +- requirements_all.txt | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/switch/wink.py b/homeassistant/components/switch/wink.py index 1f534f7290f..5d5b477be99 100644 --- a/homeassistant/components/switch/wink.py +++ b/homeassistant/components/switch/wink.py @@ -56,10 +56,10 @@ class WinkToggleDevice(WinkDevice, ToggleEntity): @property def device_state_attributes(self): """Return the state attributes.""" + attributes = super(WinkToggleDevice, self).device_state_attributes try: event = self.wink.last_event() + attributes["last_event"] = event except AttributeError: - event = None - return { - 'last_event': event - } + pass + return attributes diff --git a/homeassistant/components/wink.py b/homeassistant/components/wink.py index 67cfcc7074d..92cd7baa65e 100644 --- a/homeassistant/components/wink.py +++ b/homeassistant/components/wink.py @@ -15,7 +15,7 @@ from homeassistant.const import ( from homeassistant.helpers.entity import Entity import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['python-wink==1.2.1', 'pubnubsub-handler==1.0.1'] +REQUIREMENTS = ['python-wink==1.2.3', 'pubnubsub-handler==1.0.1'] _LOGGER = logging.getLogger(__name__) diff --git a/requirements_all.txt b/requirements_all.txt index 67c67f53b57..ef14d364136 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -626,7 +626,7 @@ python-twitch==1.3.0 python-vlc==1.1.2 # homeassistant.components.wink -python-wink==1.2.1 +python-wink==1.2.3 # homeassistant.components.device_tracker.trackr pytrackr==0.0.5