diff --git a/homeassistant/components/qwikswitch/__init__.py b/homeassistant/components/qwikswitch/__init__.py index 1ae92b0a18a..33392c51be8 100644 --- a/homeassistant/components/qwikswitch/__init__.py +++ b/homeassistant/components/qwikswitch/__init__.py @@ -1,6 +1,8 @@ """Support for Qwikswitch devices.""" import logging +from pyqwikswitch.async_ import QSUsb +from pyqwikswitch.qwikswitch import CMD_BUTTONS, QS_CMD, QS_ID, SENSORS, QSType import voluptuous as vol from homeassistant.components.binary_sensor import DEVICE_CLASSES_SCHEMA @@ -128,8 +130,6 @@ class QSToggleEntity(QSEntity): async def async_setup(hass, config): """Qwiskswitch component setup.""" - from pyqwikswitch.async_ import QSUsb - from pyqwikswitch.qwikswitch import CMD_BUTTONS, QS_CMD, QS_ID, QSType, SENSORS # Add cmd's to in /&listen packets will fire events # By default only buttons of type [TOGGLE,SCENE EXE,LEVEL] diff --git a/homeassistant/components/qwikswitch/binary_sensor.py b/homeassistant/components/qwikswitch/binary_sensor.py index a5b142e19ae..054028b5629 100644 --- a/homeassistant/components/qwikswitch/binary_sensor.py +++ b/homeassistant/components/qwikswitch/binary_sensor.py @@ -1,6 +1,8 @@ """Support for Qwikswitch Binary Sensors.""" import logging +from pyqwikswitch.qwikswitch import SENSORS + from homeassistant.components.binary_sensor import BinarySensorDevice from homeassistant.core import callback @@ -27,7 +29,6 @@ class QSBinarySensor(QSEntity, BinarySensorDevice): def __init__(self, sensor): """Initialize the sensor.""" - from pyqwikswitch.qwikswitch import SENSORS super().__init__(sensor["id"], sensor["name"]) self.channel = sensor["channel"] diff --git a/homeassistant/components/qwikswitch/sensor.py b/homeassistant/components/qwikswitch/sensor.py index 01964fc7831..4674da420b2 100644 --- a/homeassistant/components/qwikswitch/sensor.py +++ b/homeassistant/components/qwikswitch/sensor.py @@ -1,6 +1,8 @@ """Support for Qwikswitch Sensors.""" import logging +from pyqwikswitch.qwikswitch import SENSORS + from homeassistant.core import callback from . import DOMAIN as QWIKSWITCH, QSEntity @@ -26,7 +28,6 @@ class QSSensor(QSEntity): def __init__(self, sensor): """Initialize the sensor.""" - from pyqwikswitch.qwikswitch import SENSORS super().__init__(sensor["id"], sensor["name"]) self.channel = sensor["channel"]