Move imports to top for touchline (#29117)

This commit is contained in:
springstan 2019-11-27 01:06:44 +01:00 committed by Paulus Schoutsen
parent 4e96ca9486
commit 5eaafcfd7f

View file

@ -2,14 +2,15 @@
import logging
from typing import List
from pytouchline import PyTouchline
import voluptuous as vol
from homeassistant.components.climate import ClimateDevice, PLATFORM_SCHEMA
from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateDevice
from homeassistant.components.climate.const import (
SUPPORT_TARGET_TEMPERATURE,
HVAC_MODE_HEAT,
SUPPORT_TARGET_TEMPERATURE,
)
from homeassistant.const import CONF_HOST, TEMP_CELSIUS, ATTR_TEMPERATURE
from homeassistant.const import ATTR_TEMPERATURE, CONF_HOST, TEMP_CELSIUS
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
@ -21,7 +22,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({vol.Required(CONF_HOST): cv.string})
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the Touchline devices."""
from pytouchline import PyTouchline
host = config[CONF_HOST]
py_touchline = PyTouchline()