From 473e7fe846093f0287beb5f81bc4fccecffae2a9 Mon Sep 17 00:00:00 2001 From: ollo69 <60491700+ollo69@users.noreply.github.com> Date: Sun, 12 Apr 2020 02:13:05 +0200 Subject: [PATCH] Changed managed exception --- homeassistant/components/tuya/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/tuya/__init__.py b/homeassistant/components/tuya/__init__.py index 357c2906229..137cea7b25a 100644 --- a/homeassistant/components/tuya/__init__.py +++ b/homeassistant/components/tuya/__init__.py @@ -2,8 +2,8 @@ from datetime import timedelta import logging -from requests.exceptions import ConnectionError as RequestsConnectionError from tuyaha import TuyaApi +from urllib3.exceptions import NewConnectionError import voluptuous as vol from homeassistant.const import CONF_PASSWORD, CONF_PLATFORM, CONF_USERNAME @@ -69,7 +69,7 @@ def setup(hass, config, retry_delay=FIRST_RETRY_TIME): try: tuya.init(username, password, country_code, platform) - except RequestsConnectionError: + except NewConnectionError: _LOGGER.warning( "Connection error initializing %s domain. Will retry in %s seconds...", DOMAIN,