From d427063acd29a6dc71f0a86596e23c430b3b32fc Mon Sep 17 00:00:00 2001 From: William Scanlon Date: Fri, 11 Aug 2017 02:35:45 -0400 Subject: [PATCH] Update python-wink version to fix Dome water valve bug. (#8923) --- homeassistant/components/switch/wink.py | 3 ++- homeassistant/components/wink.py | 2 +- requirements_all.txt | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/switch/wink.py b/homeassistant/components/switch/wink.py index ec9311ac9e9..aa33c2f7132 100644 --- a/homeassistant/components/switch/wink.py +++ b/homeassistant/components/switch/wink.py @@ -65,7 +65,8 @@ class WinkToggleDevice(WinkDevice, ToggleEntity): attributes = super(WinkToggleDevice, self).device_state_attributes try: event = self.wink.last_event() - attributes["last_event"] = event + if event is not None: + attributes["last_event"] = event except AttributeError: pass return attributes diff --git a/homeassistant/components/wink.py b/homeassistant/components/wink.py index 316c939492b..8d40f5dad48 100644 --- a/homeassistant/components/wink.py +++ b/homeassistant/components/wink.py @@ -25,7 +25,7 @@ from homeassistant.const import ( from homeassistant.helpers.entity import Entity import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['python-wink==1.4.2', 'pubnubsub-handler==1.0.2'] +REQUIREMENTS = ['python-wink==1.5.1', 'pubnubsub-handler==1.0.2'] _LOGGER = logging.getLogger(__name__) diff --git a/requirements_all.txt b/requirements_all.txt index 91be5eb7be3..b071f7ad98c 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -775,7 +775,7 @@ python-velbus==2.0.11 python-vlc==1.1.2 # homeassistant.components.wink -python-wink==1.4.2 +python-wink==1.5.1 # homeassistant.components.zwave python_openzwave==0.4.0.31