mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 13:15:18 +02:00
Update tuya library to 0.0.6
- Catch new library exception
This commit is contained in:
@@ -2,8 +2,7 @@
|
|||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from requests.exceptions import ConnectionError as RequestsConnectionError
|
from tuyaha import TuyaApi, TuyaNetException, TuyaServerException
|
||||||
from tuyaha import TuyaApi
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import CONF_PASSWORD, CONF_PLATFORM, CONF_USERNAME
|
from homeassistant.const import CONF_PASSWORD, CONF_PLATFORM, CONF_USERNAME
|
||||||
@@ -69,7 +68,7 @@ def setup(hass, config, retry_delay=FIRST_RETRY_TIME):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
tuya.init(username, password, country_code, platform)
|
tuya.init(username, password, country_code, platform)
|
||||||
except RequestsConnectionError:
|
except (TuyaNetException, TuyaServerException):
|
||||||
|
|
||||||
_LOGGER.warning(
|
_LOGGER.warning(
|
||||||
"Connection error during integration setup. Will retry in %s seconds",
|
"Connection error during integration setup. Will retry in %s seconds",
|
||||||
|
@@ -2,6 +2,6 @@
|
|||||||
"domain": "tuya",
|
"domain": "tuya",
|
||||||
"name": "Tuya",
|
"name": "Tuya",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/tuya",
|
"documentation": "https://www.home-assistant.io/integrations/tuya",
|
||||||
"requirements": ["tuyaha==0.0.5"],
|
"requirements": ["tuyaha==0.0.6"],
|
||||||
"codeowners": []
|
"codeowners": []
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user