Remove unnecessary top-level TCP component. Fix order of inheritance on TCP BinarySensor.
This commit is contained in:
parent
348b7abe7d
commit
c1d39a2fce
3 changed files with 16 additions and 33 deletions
|
@ -11,14 +11,22 @@ from homeassistant.const import CONF_NAME, CONF_HOST
|
|||
from homeassistant.util import template
|
||||
from homeassistant.exceptions import TemplateError
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.components.tcp import (
|
||||
DOMAIN, CONF_PORT, CONF_TIMEOUT, CONF_PAYLOAD, CONF_UNIT, CONF_VALUE_REGEX,
|
||||
CONF_VALUE_TEMPLATE, CONF_VALUE_ON, CONF_BUFFER_SIZE, DEFAULT_TIMEOUT,
|
||||
DEFAULT_BUFFER_SIZE
|
||||
)
|
||||
|
||||
|
||||
DEPENDENCIES = [DOMAIN]
|
||||
# DEPENDENCIES = [DOMAIN]
|
||||
|
||||
DOMAIN = "tcp"
|
||||
|
||||
CONF_PORT = "port"
|
||||
CONF_TIMEOUT = "timeout"
|
||||
CONF_PAYLOAD = "payload"
|
||||
CONF_UNIT = "unit"
|
||||
CONF_VALUE_TEMPLATE = "value_template"
|
||||
CONF_VALUE_ON = "value_on"
|
||||
CONF_BUFFER_SIZE = "buffer_size"
|
||||
|
||||
DEFAULT_TIMEOUT = 10
|
||||
DEFAULT_BUFFER_SIZE = 1024
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -44,7 +52,6 @@ class Sensor(Entity):
|
|||
CONF_TIMEOUT: config.get(CONF_TIMEOUT, DEFAULT_TIMEOUT),
|
||||
CONF_PAYLOAD: config[CONF_PAYLOAD],
|
||||
CONF_UNIT: config.get(CONF_UNIT),
|
||||
CONF_VALUE_REGEX: config.get(CONF_VALUE_REGEX),
|
||||
CONF_VALUE_TEMPLATE: config.get(CONF_VALUE_TEMPLATE),
|
||||
CONF_VALUE_ON: config.get(CONF_VALUE_ON),
|
||||
CONF_BUFFER_SIZE: config.get(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue