Tibber login validate (#18235)

* tibber login validate

* requirements
This commit is contained in:
Daniel Høyer Iversen 2018-11-05 23:29:42 +01:00 committed by Anders Melchiorsen
parent 46b5b6240f
commit 3366d2c1ad
2 changed files with 5 additions and 2 deletions

View File

@ -16,7 +16,7 @@ from homeassistant.const import (EVENT_HOMEASSISTANT_STOP, CONF_ACCESS_TOKEN,
from homeassistant.helpers import discovery
from homeassistant.helpers.aiohttp_client import async_get_clientsession
REQUIREMENTS = ['pyTibber==0.7.2']
REQUIREMENTS = ['pyTibber==0.7.4']
DOMAIN = 'tibber'
@ -47,6 +47,9 @@ async def async_setup(hass, config):
await tibber_connection.update_info()
except (asyncio.TimeoutError, aiohttp.ClientError):
return False
except tibber.InvalidLogin as exp:
_LOGGER.error("Failed to login. %s", exp)
return False
for component in ['sensor', 'notify']:
discovery.load_platform(hass, component, DOMAIN,

View File

@ -800,7 +800,7 @@ pyRFXtrx==0.23
pySwitchmate==0.4.2
# homeassistant.components.tibber
pyTibber==0.7.2
pyTibber==0.7.4
# homeassistant.components.switch.dlink
pyW215==0.6.0