Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move imports to top for qwikswitch #29328

Merged
merged 1 commit into from
Dec 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions homeassistant/components/qwikswitch/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -128,8 +130,6 @@ async def async_turn_off(self, **_):

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]
Expand Down
3 changes: 2 additions & 1 deletion homeassistant/components/qwikswitch/binary_sensor.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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"]
Expand Down
3 changes: 2 additions & 1 deletion homeassistant/components/qwikswitch/sensor.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"]
Expand Down