This commit is contained in:
J. Nick Koston 2023-06-17 09:41:42 -05:00
parent 8b400a9f78
commit 356a8a0fec
No known key found for this signature in database
1 changed files with 15 additions and 20 deletions

View File

@ -2,8 +2,6 @@ import esphome.codegen as cg
import esphome.config_validation as cv
from esphome import pins
from esphome.const import CONF_ID
from esphome.const import CONF_ID
from esphome import pins
DEPENDENCIES = ["preferences"]
MULTI_CONF = True
@ -26,23 +24,20 @@ DEFAULT_INPUT_OBST = "D7" # D7 black obstruction sensor terminal
CONF_RATGDO_ID = "ratgdo_id"
CONFIG_SCHEMA = (
cv.Schema(
{
cv.GenerateID(): cv.declare_id(RATGDO),
cv.Optional(
CONF_OUTPUT_GDO, default=DEFAULT_OUTPUT_GDO
): pins.gpio_output_pin_schema,
cv.Optional(
CONF_INPUT_GDO, default=DEFAULT_INPUT_GDO
): pins.gpio_input_pin_schema,
cv.Optional(
CONF_INPUT_OBST, default=DEFAULT_INPUT_OBST
): pins.gpio_input_pin_schema,
}
)
.extend(cv.COMPONENT_SCHEMA)
)
CONFIG_SCHEMA = cv.Schema(
{
cv.GenerateID(): cv.declare_id(RATGDO),
cv.Optional(
CONF_OUTPUT_GDO, default=DEFAULT_OUTPUT_GDO
): pins.gpio_output_pin_schema,
cv.Optional(
CONF_INPUT_GDO, default=DEFAULT_INPUT_GDO
): pins.gpio_input_pin_schema,
cv.Optional(
CONF_INPUT_OBST, default=DEFAULT_INPUT_OBST
): pins.gpio_input_pin_schema,
}
).extend(cv.COMPONENT_SCHEMA)
RATGDO_CLIENT_SCHMEA = cv.Schema(
{
@ -75,4 +70,4 @@ async def to_code(config):
name="espsoftwareserial",
repository="https://github.com/esphome-ratgdo/espsoftwareserial",
version="2f408224633316b997f82339e5b2731b1e561060",
)
)