binary sensor
This commit is contained in:
parent
89c237c374
commit
f94cf1d724
|
@ -36,7 +36,7 @@ CONF_STATUS_OBST = "status_obst_pin"
|
||||||
DEFAULT_STATUS_OBST = (
|
DEFAULT_STATUS_OBST = (
|
||||||
15 # D8 output for obstruction status, HIGH for obstructed, LOW for clear
|
15 # D8 output for obstruction status, HIGH for obstructed, LOW for clear
|
||||||
)
|
)
|
||||||
|
CONF_RATGDO_ID = "ratgdo_id"
|
||||||
|
|
||||||
CONFIG_SCHEMA = (
|
CONFIG_SCHEMA = (
|
||||||
cv.Schema(
|
cv.Schema(
|
||||||
|
@ -72,9 +72,14 @@ CONFIG_SCHEMA = (
|
||||||
.extend(uart.UART_DEVICE_SCHEMA)
|
.extend(uart.UART_DEVICE_SCHEMA)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
RATGDO_CLIENT_SCHMEA = cv.Schema(
|
||||||
|
{
|
||||||
|
cv.Required(CONF_RATGDO_ID): cv.use_id(RATGDO),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
async def register_ratgdo_child(var, config):
|
async def register_ratgdo_child(var, config):
|
||||||
parent = cv.use_id(RATGDO)
|
parent = await cg.get_variable(config[CONF_RATGDO_ID])
|
||||||
cg.add(parent.register_child(var))
|
cg.add(parent.register_child(var))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue