Upgrade thingspeak to 1.0.0 (#28424)

This commit is contained in:
Fabian Affolter 2019-11-01 13:09:45 +01:00 committed by cgtobi
parent bb6a617a6f
commit 72a17d4c67
3 changed files with 4 additions and 6 deletions

View file

@ -37,20 +37,18 @@ CONFIG_SCHEMA = vol.Schema(
def setup(hass, config): def setup(hass, config):
"""Set up the Thingspeak environment.""" """Set up the Thingspeak environment."""
conf = config[DOMAIN] conf = config[DOMAIN]
api_key = conf.get(CONF_API_KEY) api_key = conf.get(CONF_API_KEY)
channel_id = conf.get(CONF_ID) channel_id = conf.get(CONF_ID)
entity = conf.get(CONF_WHITELIST) entity = conf.get(CONF_WHITELIST)
try: try:
channel = thingspeak.Channel(channel_id, write_key=api_key, timeout=TIMEOUT) channel = thingspeak.Channel(channel_id, api_key=api_key, timeout=TIMEOUT)
channel.get() channel.get()
except RequestException: except RequestException:
_LOGGER.error( _LOGGER.error(
"Error while accessing the ThingSpeak channel. " "Error while accessing the ThingSpeak channel. "
"Please check that the channel exists and your " "Please check that the channel exists and your API key is correct"
"API key is correct"
) )
return False return False

View file

@ -3,7 +3,7 @@
"name": "Thingspeak", "name": "Thingspeak",
"documentation": "https://www.home-assistant.io/integrations/thingspeak", "documentation": "https://www.home-assistant.io/integrations/thingspeak",
"requirements": [ "requirements": [
"thingspeak==0.4.1" "thingspeak==1.0.0"
], ],
"dependencies": [], "dependencies": [],
"codeowners": [] "codeowners": []

View file

@ -1898,7 +1898,7 @@ teslajsonpy==0.0.26
thermoworks_smoke==0.1.8 thermoworks_smoke==0.1.8
# homeassistant.components.thingspeak # homeassistant.components.thingspeak
thingspeak==0.4.1 thingspeak==1.0.0
# homeassistant.components.tikteck # homeassistant.components.tikteck
tikteck==0.4 tikteck==0.4