Move imports to top for smarty (#29251)

pull/29281/head
springstan 2019-12-01 06:24:17 +01:00 committed by Paulus Schoutsen
parent bea5d18c4a
commit 8da7f40736
4 changed files with 10 additions and 8 deletions

View File

@ -1,12 +1,13 @@
"""Support to control a Salda Smarty XP/XV ventilation unit."""
from datetime import timedelta
import ipaddress
import logging
from pysmarty import Smarty
import voluptuous as vol
from homeassistant.const import CONF_NAME, CONF_HOST
from homeassistant.const import CONF_HOST, CONF_NAME
from homeassistant.helpers import discovery
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.dispatcher import dispatcher_send
@ -36,7 +37,6 @@ SIGNAL_UPDATE_SMARTY = "smarty_update"
def setup(hass, config):
"""Set up the smarty environment."""
from pysmarty import Smarty
conf = config[DOMAIN]

View File

@ -2,9 +2,10 @@
import logging
from homeassistant.core import callback
from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from . import DOMAIN, SIGNAL_UPDATE_SMARTY
_LOGGER = logging.getLogger(__name__)

View File

@ -2,7 +2,6 @@
import logging
from homeassistant.core import callback
from homeassistant.components.fan import (
SPEED_HIGH,
SPEED_LOW,
@ -11,6 +10,7 @@ from homeassistant.components.fan import (
SUPPORT_SET_SPEED,
FanEntity,
)
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from . import DOMAIN, SIGNAL_UPDATE_SMARTY

View File

@ -3,15 +3,16 @@
import datetime as dt
import logging
from homeassistant.core import callback
from homeassistant.const import (
TEMP_CELSIUS,
DEVICE_CLASS_TEMPERATURE,
DEVICE_CLASS_TIMESTAMP,
TEMP_CELSIUS,
)
import homeassistant.util.dt as dt_util
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity import Entity
import homeassistant.util.dt as dt_util
from . import DOMAIN, SIGNAL_UPDATE_SMARTY
_LOGGER = logging.getLogger(__name__)