Move imports to top for lutron (#29389)
parent
49232332a1
commit
1a51590711
|
@ -1,11 +1,12 @@
|
|||
"""Component for interacting with a Lutron RadioRA 2 system."""
|
||||
import logging
|
||||
|
||||
from pylutron import Button, Lutron
|
||||
import voluptuous as vol
|
||||
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.const import ATTR_ID, CONF_HOST, CONF_PASSWORD, CONF_USERNAME
|
||||
from homeassistant.helpers import discovery
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.util import slugify
|
||||
|
||||
|
@ -36,7 +37,6 @@ CONFIG_SCHEMA = vol.Schema(
|
|||
|
||||
def setup(hass, base_config):
|
||||
"""Set up the Lutron component."""
|
||||
from pylutron import Lutron
|
||||
|
||||
hass.data[LUTRON_BUTTONS] = []
|
||||
hass.data[LUTRON_CONTROLLER] = None
|
||||
|
@ -147,7 +147,6 @@ class LutronButton:
|
|||
|
||||
def button_callback(self, button, context, event, params):
|
||||
"""Fire an event about a button being pressed or released."""
|
||||
from pylutron import Button
|
||||
|
||||
# Events per button type:
|
||||
# RaiseLower -> pressed/released
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
from pylutron import OccupancyGroup
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
BinarySensorDevice,
|
||||
DEVICE_CLASS_OCCUPANCY,
|
||||
BinarySensorDevice,
|
||||
)
|
||||
|
||||
from . import LUTRON_CONTROLLER, LUTRON_DEVICES, LutronDevice
|
||||
|
|
Loading…
Reference in New Issue