diff --git a/homeassistant/components/tuya/__init__.py b/homeassistant/components/tuya/__init__.py index 4d6506d950d..dffd66265a6 100644 --- a/homeassistant/components/tuya/__init__.py +++ b/homeassistant/components/tuya/__init__.py @@ -1,13 +1,15 @@ """Support for Tuya Smart devices.""" from datetime import timedelta import logging + +from tuyaha import TuyaApi import voluptuous as vol +from homeassistant.const import CONF_PASSWORD, CONF_PLATFORM, CONF_USERNAME from homeassistant.core import callback -import homeassistant.helpers.config_validation as cv -from homeassistant.const import CONF_USERNAME, CONF_PASSWORD, CONF_PLATFORM from homeassistant.helpers import discovery -from homeassistant.helpers.dispatcher import dispatcher_send, async_dispatcher_connect +import homeassistant.helpers.config_validation as cv +from homeassistant.helpers.dispatcher import async_dispatcher_connect, dispatcher_send from homeassistant.helpers.entity import Entity from homeassistant.helpers.event import track_time_interval @@ -50,7 +52,6 @@ CONFIG_SCHEMA = vol.Schema( def setup(hass, config): """Set up Tuya Component.""" - from tuyaha import TuyaApi tuya = TuyaApi() username = config[DOMAIN][CONF_USERNAME] diff --git a/homeassistant/components/tuya/climate.py b/homeassistant/components/tuya/climate.py index 02e8a1bf821..6450920b806 100644 --- a/homeassistant/components/tuya/climate.py +++ b/homeassistant/components/tuya/climate.py @@ -5,9 +5,9 @@ from homeassistant.components.climate.const import ( HVAC_MODE_COOL, HVAC_MODE_FAN_ONLY, HVAC_MODE_HEAT, + HVAC_MODE_OFF, SUPPORT_FAN_MODE, SUPPORT_TARGET_TEMPERATURE, - HVAC_MODE_OFF, ) from homeassistant.components.fan import SPEED_HIGH, SPEED_LOW, SPEED_MEDIUM from homeassistant.const import (