Show the error message when Zabbix fails to log in (#12985)
* Show the error message when Zabbix fails to log in * More verbose name for exception variable
This commit is contained in:
parent
ab397e2b1a
commit
6d7dbe5536
1 changed files with 2 additions and 2 deletions
|
@ -52,8 +52,8 @@ def setup(hass, config):
|
||||||
try:
|
try:
|
||||||
zapi.login(username, password)
|
zapi.login(username, password)
|
||||||
_LOGGER.info("Connected to Zabbix API Version %s", zapi.api_version())
|
_LOGGER.info("Connected to Zabbix API Version %s", zapi.api_version())
|
||||||
except ZabbixAPIException:
|
except ZabbixAPIException as login_exception:
|
||||||
_LOGGER.error("Unable to login to the Zabbix API")
|
_LOGGER.error("Unable to login to the Zabbix API: %s", login_exception)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
hass.data[DOMAIN] = zapi
|
hass.data[DOMAIN] = zapi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue