Move imports to top for lutron_caseta (#29390)

pull/29390/merge
springstan 2019-12-04 11:14:07 +01:00 committed by Fabian Affolter
parent 1a51590711
commit 025c1a39a7
2 changed files with 5 additions and 5 deletions

View File

@ -1,11 +1,12 @@
"""Component for interacting with a Lutron Caseta system."""
import logging
from pylutron_caseta.smartbridge import Smartbridge
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.const import CONF_HOST
from homeassistant.helpers import discovery
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
_LOGGER = logging.getLogger(__name__)
@ -37,7 +38,6 @@ LUTRON_CASETA_COMPONENTS = ["light", "switch", "cover", "scene", "fan"]
async def async_setup(hass, base_config):
"""Set up the Lutron component."""
from pylutron_caseta.smartbridge import Smartbridge
config = base_config.get(DOMAIN)
keyfile = hass.config.path(config[CONF_KEYFILE])

View File

@ -1,16 +1,16 @@
"""Support for Lutron Caseta fans."""
import logging
from pylutron_caseta import FAN_OFF, FAN_LOW, FAN_MEDIUM, FAN_MEDIUM_HIGH, FAN_HIGH
from pylutron_caseta import FAN_HIGH, FAN_LOW, FAN_MEDIUM, FAN_MEDIUM_HIGH, FAN_OFF
from homeassistant.components.fan import (
SUPPORT_SET_SPEED,
FanEntity,
DOMAIN,
SPEED_HIGH,
SPEED_LOW,
SPEED_MEDIUM,
SPEED_OFF,
SUPPORT_SET_SPEED,
FanEntity,
)
from . import LUTRON_CASETA_SMARTBRIDGE, LutronCasetaDevice