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 ad38eb8aa05..07bb6846c61 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