mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 13:15:18 +02:00
Catch wrong credential
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
from tuyaha import TuyaApi, TuyaNetException, TuyaServerException
|
||||
from tuyaha import TuyaApi, TuyaAPIException, TuyaNetException, TuyaServerException
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import CONF_PASSWORD, CONF_PLATFORM, CONF_USERNAME
|
||||
@@ -83,6 +83,13 @@ def setup(hass, config, retry_delay=FIRST_RETRY_TIME):
|
||||
|
||||
return True
|
||||
|
||||
except TuyaAPIException as ex:
|
||||
_LOGGER.error(
|
||||
"Connection error during integration setup. Error: %s",
|
||||
str(ex),
|
||||
)
|
||||
return False
|
||||
|
||||
hass.data[DATA_TUYA] = tuya
|
||||
hass.data[DOMAIN] = {"entities": {}}
|
||||
|
||||
|
@@ -2062,7 +2062,7 @@ tp-connected==0.0.4
|
||||
transmissionrpc==0.11
|
||||
|
||||
# homeassistant.components.tuya
|
||||
tuyaha==0.0.5
|
||||
tuyaha==0.0.6
|
||||
|
||||
# homeassistant.components.twentemilieu
|
||||
twentemilieu==0.3.0
|
||||
|
Reference in New Issue
Block a user