Move imports in concord232 component (#27887)

pull/27897/head
bouni 2019-10-19 00:00:00 +02:00 committed by cgtobi
parent c333daab10
commit dc30119d20
2 changed files with 7 additions and 7 deletions

View File

@ -2,22 +2,23 @@
import datetime
import logging
from concord232 import client as concord232_client
import requests
import voluptuous as vol
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.const import (
CONF_CODE,
CONF_HOST,
CONF_MODE,
CONF_NAME,
CONF_PORT,
CONF_CODE,
CONF_MODE,
STATE_ALARM_ARMED_AWAY,
STATE_ALARM_ARMED_HOME,
STATE_ALARM_DISARMED,
)
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
@ -60,7 +61,6 @@ class Concord232Alarm(alarm.AlarmControlPanel):
def __init__(self, url, name, code, mode):
"""Initialize the Concord232 alarm panel."""
from concord232 import client as concord232_client
self._state = None
self._name = name

View File

@ -2,13 +2,14 @@
import datetime
import logging
from concord232 import client as concord232_client
import requests
import voluptuous as vol
from homeassistant.components.binary_sensor import (
BinarySensorDevice,
PLATFORM_SCHEMA,
DEVICE_CLASSES,
PLATFORM_SCHEMA,
BinarySensorDevice,
)
from homeassistant.const import CONF_HOST, CONF_PORT
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):
"""Set up the Concord232 binary sensor platform."""
from concord232 import client as concord232_client
host = config.get(CONF_HOST)
port = config.get(CONF_PORT)