コード例 #1
0
 def keep_alive_call(event_time):
     """Call the Wink API endpoints to keep PubNub working."""
     _LOGGER.info("Polling the Wink API to keep PubNub updates flowing")
     pywink.set_user_agent(str(int(time.time())))
     _temp_response = pywink.get_user()
     _LOGGER.debug(str(json.dumps(_temp_response)))
     time.sleep(1)
     pywink.set_user_agent(USER_AGENT)
     _temp_response = pywink.wink_api_fetch()
     _LOGGER.debug("%s", _temp_response)
     _temp_response = pywink.post_session()
     _LOGGER.debug("%s", _temp_response)
コード例 #2
0
ファイル: __init__.py プロジェクト: arsaboo/home-assistant
 def keep_alive_call(event_time):
     """Call the Wink API endpoints to keep PubNub working."""
     _LOGGER.info("Polling the Wink API to keep PubNub updates flowing")
     pywink.set_user_agent(str(int(time.time())))
     _temp_response = pywink.get_user()
     _LOGGER.debug(str(json.dumps(_temp_response)))
     time.sleep(1)
     pywink.set_user_agent(USER_AGENT)
     _temp_response = pywink.wink_api_fetch()
     _LOGGER.debug("%s", _temp_response)
     _temp_response = pywink.post_session()
     _LOGGER.debug("%s", _temp_response)