From 2425a0db92d39a328ad6ca1337a2f6f43598eccd Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 7 Jun 2023 11:20:14 -0500 Subject: [PATCH] binary sensor --- components/ratgdo/binary_sensor/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/ratgdo/binary_sensor/__init__.py b/components/ratgdo/binary_sensor/__init__.py index 190b559..423203f 100644 --- a/components/ratgdo/binary_sensor/__init__.py +++ b/components/ratgdo/binary_sensor/__init__.py @@ -18,9 +18,8 @@ CONF_TYPE = "type" TYPES = {"motion", "obstruction"} -CONFIG_SCHEMA = binary_sensor.BINARY_SENSOR_SCHEMA.extend( +CONFIG_SCHEMA = binary_sensor.binary_sensor_schema(RATGDOBinarySensor).extend( { - cv.GenerateID(): cv.declare_id(RATGDOBinarySensor), cv.Required(CONF_TYPE): str } ).extend(RATGDO_CLIENT_SCHMEA) @@ -28,6 +27,6 @@ CONFIG_SCHEMA = binary_sensor.BINARY_SENSOR_SCHEMA.extend( async def to_code(config): var = cg.new_Pvariable(config[CONF_ID]) - await cg.register_component(var, config) await binary_sensor.register_binary_sensor(var, config) + await cg.register_component(var, config) await register_ratgdo_child(var, config)