forked from home-assistant/core
Clarify tahoma errrors (#12307)
This commit is contained in:
committed by
Fabian Affolter
parent
767d3c6206
commit
47bfef9640
@@ -57,14 +57,14 @@ def setup(hass, config):
|
|||||||
try:
|
try:
|
||||||
api = TahomaApi(username, password)
|
api = TahomaApi(username, password)
|
||||||
except RequestException:
|
except RequestException:
|
||||||
_LOGGER.exception("Error communicating with Tahoma API")
|
_LOGGER.exception("Error when trying to log in to the Tahoma API")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
api.get_setup()
|
api.get_setup()
|
||||||
devices = api.get_devices()
|
devices = api.get_devices()
|
||||||
except RequestException:
|
except RequestException:
|
||||||
_LOGGER.exception("Cannot fetch information from Tahoma API")
|
_LOGGER.exception("Error when getting devices from the Tahoma API")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
hass.data[DOMAIN] = {
|
hass.data[DOMAIN] = {
|
||||||
|
Reference in New Issue
Block a user