Move imports to the top for Tado. (#29016)

This commit is contained in:
Michaël Arnauts authored and Fabian Affolter committed 2019-11-24 22:47:31 +01:00
1 parent 1495df374b
commit 647595fd67
3 files changed
+14 -15

No files matched your search

+4 -5
View File
@@ -1,13 +1,14 @@
"""Support for the (unofficial) Tado API."""
from datetime import timedelta
import logging
import urllib
from datetime import timedelta
from PyTado.interface import Tado
import voluptuous as vol
from homeassistant.helpers.discovery import load_platform
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from homeassistant.helpers import config_validation as cv
from homeassistant.const import CONF_USERNAME, CONF_PASSWORD
from homeassistant.helpers.discovery import load_platform
from homeassistant.util import Throttle
_LOGGER = logging.getLogger(__name__)
@@ -37,8 +38,6 @@ def setup(hass, config):
username = config[DOMAIN][CONF_USERNAME]
password = config[DOMAIN][CONF_PASSWORD]
from PyTado.interface import Tado
try:
tado = Tado(username, password)
tado.setDebugging(True)