mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Move imports to top for nx584 (#29537)
This commit is contained in:
parent
e2a9c652ab
commit
0aace1da55
@ -1,6 +1,7 @@
|
|||||||
"""Support for NX584 alarm control panels."""
|
"""Support for NX584 alarm control panels."""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from nx584 import client
|
||||||
import requests
|
import requests
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
@ -56,7 +57,6 @@ class NX584Alarm(alarm.AlarmControlPanel):
|
|||||||
|
|
||||||
def __init__(self, hass, url, name):
|
def __init__(self, hass, url, name):
|
||||||
"""Init the nx584 alarm panel."""
|
"""Init the nx584 alarm panel."""
|
||||||
from nx584 import client
|
|
||||||
|
|
||||||
self._hass = hass
|
self._hass = hass
|
||||||
self._name = name
|
self._name = name
|
||||||
|
@ -3,13 +3,14 @@ import logging
|
|||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
from nx584 import client as nx584_client
|
||||||
import requests
|
import requests
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.binary_sensor import (
|
from homeassistant.components.binary_sensor import (
|
||||||
DEVICE_CLASSES,
|
DEVICE_CLASSES,
|
||||||
BinarySensorDevice,
|
|
||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
|
BinarySensorDevice,
|
||||||
)
|
)
|
||||||
from homeassistant.const import CONF_HOST, CONF_PORT
|
from homeassistant.const import CONF_HOST, CONF_PORT
|
||||||
import homeassistant.helpers.config_validation as cv
|
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):
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
"""Set up the NX584 binary sensor platform."""
|
"""Set up the NX584 binary sensor platform."""
|
||||||
from nx584 import client as nx584_client
|
|
||||||
|
|
||||||
host = config.get(CONF_HOST)
|
host = config.get(CONF_HOST)
|
||||||
port = config.get(CONF_PORT)
|
port = config.get(CONF_PORT)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user