Upgrade thingspeak to 1.0.0 (#28424)

pull/28574/head
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):
"""Set up the Thingspeak environment."""
conf = config[DOMAIN]
api_key = conf.get(CONF_API_KEY)
channel_id = conf.get(CONF_ID)
entity = conf.get(CONF_WHITELIST)
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()
except RequestException:
_LOGGER.error(
"Error while accessing the ThingSpeak channel. "
"Please check that the channel exists and your "
"API key is correct"
"Please check that the channel exists and your API key is correct"
)
return False

View File

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

View File

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