proper access_token check
This commit is contained in:
parent
3b8c5d6833
commit
e76defe035
1 changed files with 2 additions and 2 deletions
|
@ -37,12 +37,12 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||
name = config.get(CONF_NAME, DEFAULT_NAME)
|
||||
channel_id = config.get("channel_id")
|
||||
|
||||
if not access_token:
|
||||
if access_token is None:
|
||||
_LOGGER.error(
|
||||
"Configuration Error"
|
||||
"Please make sure you have configured your access token " +
|
||||
"that can be aquired from https://my.eliq.se/user/settings/api")
|
||||
return None
|
||||
return False
|
||||
|
||||
api = eliqonline.API(access_token)
|
||||
add_devices([EliqSensor(api, channel_id, name)])
|
||||
|
|
Loading…
Add table
Reference in a new issue