From 2836ff86fe140ec280ba7f692a8e32a61a35dc65 Mon Sep 17 00:00:00 2001 From: William Scanlon Date: Wed, 30 Jan 2019 14:35:47 -0500 Subject: [PATCH] Update to the newest python-wink and fix push updates! (#20594) * Update to the newest python-wink and make post session call to Wink to keep pubnub working. * Update __init__.py --- homeassistant/components/wink/__init__.py | 6 ++++-- requirements_all.txt | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/wink/__init__.py b/homeassistant/components/wink/__init__.py index 90e717efd9c..3cedb0b126b 100644 --- a/homeassistant/components/wink/__init__.py +++ b/homeassistant/components/wink/__init__.py @@ -25,7 +25,7 @@ from homeassistant.helpers.entity_component import EntityComponent from homeassistant.helpers.event import track_time_interval from homeassistant.util.json import load_json, save_json -REQUIREMENTS = ['python-wink==1.10.1', 'pubnubsub-handler==1.0.3'] +REQUIREMENTS = ['python-wink==1.10.3', 'pubnubsub-handler==1.0.3'] _LOGGER = logging.getLogger(__name__) @@ -358,7 +358,9 @@ def setup(hass, config): time.sleep(1) pywink.set_user_agent(USER_AGENT) _temp_response = pywink.wink_api_fetch() - _LOGGER.debug(str(json.dumps(_temp_response))) + _LOGGER.debug("%s", _temp_response) + _temp_response = pywink.post_session() + _LOGGER.debug("%s", _temp_response) # Call the Wink API every hour to keep PubNub updates flowing track_time_interval(hass, keep_alive_call, timedelta(minutes=60)) diff --git a/requirements_all.txt b/requirements_all.txt index 6ccf12dba1e..4b8942681bd 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1354,7 +1354,7 @@ python-velbus==2.0.21 python-vlc==1.1.2 # homeassistant.components.wink -python-wink==1.10.1 +python-wink==1.10.3 # homeassistant.components.sensor.awair python_awair==0.0.3