Move imports to top for nx584 (#29537)

This commit is contained in:
springstan 2019-12-06 09:08:54 +01:00 committed by Franck Nijhof
parent e2a9c652ab
commit 0aace1da55
2 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,7 @@
"""Support for NX584 alarm control panels."""
import logging
from nx584 import client
import requests
import voluptuous as vol
@ -56,7 +57,6 @@ class NX584Alarm(alarm.AlarmControlPanel):
def __init__(self, hass, url, name):
"""Init the nx584 alarm panel."""
from nx584 import client
self._hass = hass
self._name = name

View file

@ -3,13 +3,14 @@ import logging
import threading
import time
from nx584 import client as nx584_client
import requests
import voluptuous as vol
from homeassistant.components.binary_sensor import (
DEVICE_CLASSES,
BinarySensorDevice,
PLATFORM_SCHEMA,
BinarySensorDevice,
)
from homeassistant.const import CONF_HOST, CONF_PORT
import homeassistant.helpers.config_validation as cv
@ -39,7 +40,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the NX584 binary sensor platform."""
from nx584 import client as nx584_client
host = config.get(CONF_HOST)
port = config.get(CONF_PORT)