From f77eda29810d65c6ef314bb6a045e0aa6949ae73 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 13 Feb 2017 11:25:28 +0100 Subject: [PATCH] Upgrade thingspeak to 0.4.1 and use the correct API key (#5906) --- homeassistant/components/thingspeak.py | 10 +++++----- requirements_all.txt | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/thingspeak.py b/homeassistant/components/thingspeak.py index 5f0ce2dc596..a21d44527a1 100644 --- a/homeassistant/components/thingspeak.py +++ b/homeassistant/components/thingspeak.py @@ -15,7 +15,7 @@ from homeassistant.helpers import state as state_helper import homeassistant.helpers.config_validation as cv import homeassistant.helpers.event as event -REQUIREMENTS = ['thingspeak==0.4.0'] +REQUIREMENTS = ['thingspeak==0.4.1'] _LOGGER = logging.getLogger(__name__) @@ -43,7 +43,7 @@ def setup(hass, config): try: channel = thingspeak.Channel( - channel_id, api_key=api_key, timeout=TIMEOUT) + channel_id, write_key=api_key, timeout=TIMEOUT) channel.get() except RequestException: _LOGGER.error("Error while accessing the ThingSpeak channel. " @@ -52,7 +52,7 @@ def setup(hass, config): return False def thingspeak_listener(entity_id, old_state, new_state): - """Listen for new events and send them to thingspeak.""" + """Listen for new events and send them to Thingspeak.""" if new_state is None or new_state.state in ( STATE_UNKNOWN, '', STATE_UNAVAILABLE): return @@ -65,8 +65,8 @@ def setup(hass, config): try: channel.update({'field1': _state}) except RequestException: - _LOGGER.error("Error while sending value '%s' to Thingspeak", - _state) + _LOGGER.error( + "Error while sending value '%s' to Thingspeak", _state) event.track_state_change(hass, entity, thingspeak_listener) diff --git a/requirements_all.txt b/requirements_all.txt index c452b58b3c3..271043089f8 100755 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -664,7 +664,7 @@ tellduslive==0.3.2 temperusb==1.5.1 # homeassistant.components.thingspeak -thingspeak==0.4.0 +thingspeak==0.4.1 # homeassistant.components.light.tikteck tikteck==0.4