Use core constants for envisalink (#46136)

This commit is contained in:
tkdrob 2021-02-07 13:28:40 -05:00 committed by GitHub
parent 94eb31025c
commit 74053b5f2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -5,7 +5,12 @@ import logging
from pyenvisalink import EnvisalinkAlarmPanel
import voluptuous as vol
from homeassistant.const import CONF_HOST, CONF_TIMEOUT, EVENT_HOMEASSISTANT_STOP
from homeassistant.const import (
CONF_CODE,
CONF_HOST,
CONF_TIMEOUT,
EVENT_HOMEASSISTANT_STOP,
)
from homeassistant.core import callback
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.discovery import async_load_platform
@ -18,7 +23,6 @@ DOMAIN = "envisalink"
DATA_EVL = "envisalink"
CONF_CODE = "code"
CONF_EVL_KEEPALIVE = "keepalive_interval"
CONF_EVL_PORT = "port"
CONF_EVL_VERSION = "evl_version"
@ -99,7 +103,6 @@ SERVICE_SCHEMA = vol.Schema(
async def async_setup(hass, config):
"""Set up for Envisalink devices."""
conf = config.get(DOMAIN)
host = conf.get(CONF_HOST)

View File

@ -15,6 +15,7 @@ from homeassistant.components.alarm_control_panel.const import (
)
from homeassistant.const import (
ATTR_ENTITY_ID,
CONF_CODE,
STATE_ALARM_ARMED_AWAY,
STATE_ALARM_ARMED_HOME,
STATE_ALARM_ARMED_NIGHT,
@ -28,7 +29,6 @@ import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from . import (
CONF_CODE,
CONF_PANIC,
CONF_PARTITIONNAME,
DATA_EVL,