Use core constants for elkm1 (#46091)

This commit is contained in:
tkdrob 2021-02-09 14:20:20 -05:00 committed by GitHub
parent c69c493cf9
commit f46dc3c48e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 7 deletions

View file

@ -13,6 +13,7 @@ from homeassistant.const import (
CONF_HOST,
CONF_INCLUDE,
CONF_PASSWORD,
CONF_PREFIX,
CONF_TEMPERATURE_UNIT,
CONF_USERNAME,
TEMP_CELSIUS,
@ -38,7 +39,6 @@ from .const import (
CONF_KEYPAD,
CONF_OUTPUT,
CONF_PLC,
CONF_PREFIX,
CONF_SETTING,
CONF_TASK,
CONF_THERMOSTAT,
@ -197,7 +197,6 @@ def _async_find_matching_config_entry(hass, prefix):
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
"""Set up Elk-M1 Control from a config entry."""
conf = entry.data
_LOGGER.debug("Setting up elkm1 %s", conf["host"])

View file

@ -11,6 +11,7 @@ from homeassistant.const import (
CONF_ADDRESS,
CONF_HOST,
CONF_PASSWORD,
CONF_PREFIX,
CONF_PROTOCOL,
CONF_TEMPERATURE_UNIT,
CONF_USERNAME,
@ -20,7 +21,7 @@ from homeassistant.const import (
from homeassistant.util import slugify
from . import async_wait_for_elk_to_sync
from .const import CONF_AUTO_CONFIGURE, CONF_PREFIX
from .const import CONF_AUTO_CONFIGURE
from .const import DOMAIN # pylint:disable=unused-import
_LOGGER = logging.getLogger(__name__)
@ -50,7 +51,6 @@ async def validate_input(data):
Data has the keys from DATA_SCHEMA with values provided by the user.
"""
userid = data.get(CONF_USERNAME)
password = data.get(CONF_PASSWORD)

View file

@ -3,7 +3,7 @@
from elkm1_lib.const import Max
import voluptuous as vol
from homeassistant.const import ATTR_CODE
from homeassistant.const import ATTR_CODE, CONF_ZONE
DOMAIN = "elkm1"
@ -17,8 +17,6 @@ CONF_PLC = "plc"
CONF_SETTING = "setting"
CONF_TASK = "task"
CONF_THERMOSTAT = "thermostat"
CONF_ZONE = "zone"
CONF_PREFIX = "prefix"
BARE_TEMP_FAHRENHEIT = "F"