mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Move imports in concord232 component (#27887)
This commit is contained in:
parent
c333daab10
commit
dc30119d20
@ -2,22 +2,23 @@
|
|||||||
import datetime
|
import datetime
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from concord232 import client as concord232_client
|
||||||
import requests
|
import requests
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
import homeassistant.components.alarm_control_panel as alarm
|
import homeassistant.components.alarm_control_panel as alarm
|
||||||
import homeassistant.helpers.config_validation as cv
|
|
||||||
from homeassistant.components.alarm_control_panel import PLATFORM_SCHEMA
|
from homeassistant.components.alarm_control_panel import PLATFORM_SCHEMA
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
CONF_CODE,
|
||||||
CONF_HOST,
|
CONF_HOST,
|
||||||
|
CONF_MODE,
|
||||||
CONF_NAME,
|
CONF_NAME,
|
||||||
CONF_PORT,
|
CONF_PORT,
|
||||||
CONF_CODE,
|
|
||||||
CONF_MODE,
|
|
||||||
STATE_ALARM_ARMED_AWAY,
|
STATE_ALARM_ARMED_AWAY,
|
||||||
STATE_ALARM_ARMED_HOME,
|
STATE_ALARM_ARMED_HOME,
|
||||||
STATE_ALARM_DISARMED,
|
STATE_ALARM_DISARMED,
|
||||||
)
|
)
|
||||||
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -60,7 +61,6 @@ class Concord232Alarm(alarm.AlarmControlPanel):
|
|||||||
|
|
||||||
def __init__(self, url, name, code, mode):
|
def __init__(self, url, name, code, mode):
|
||||||
"""Initialize the Concord232 alarm panel."""
|
"""Initialize the Concord232 alarm panel."""
|
||||||
from concord232 import client as concord232_client
|
|
||||||
|
|
||||||
self._state = None
|
self._state = None
|
||||||
self._name = name
|
self._name = name
|
||||||
|
@ -2,13 +2,14 @@
|
|||||||
import datetime
|
import datetime
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from concord232 import client as concord232_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 (
|
||||||
BinarySensorDevice,
|
|
||||||
PLATFORM_SCHEMA,
|
|
||||||
DEVICE_CLASSES,
|
DEVICE_CLASSES,
|
||||||
|
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
|
||||||
@ -42,7 +43,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 Concord232 binary sensor platform."""
|
"""Set up the Concord232 binary sensor platform."""
|
||||||
from concord232 import client as concord232_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