From b9cc7d25223cfb14072088245fef6e1dc85016cd Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 7 Jun 2023 11:04:56 -0500 Subject: [PATCH] binary sensor --- components/ratgdo/binary_sensor/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/ratgdo/binary_sensor/__init__.py b/components/ratgdo/binary_sensor/__init__.py index f20c95e..32ff065 100644 --- a/components/ratgdo/binary_sensor/__init__.py +++ b/components/ratgdo/binary_sensor/__init__.py @@ -1,5 +1,6 @@ import esphome.codegen as cg import esphome.config_validation as cv +from esphome.const import CONF_ID from esphome.components import binary_sensor from .. import ( ratgdo_ns, @@ -22,6 +23,7 @@ CONFIG_SCHEMA = binary_sensor.BINARY_SENSOR_SCHEMA.extend( async def to_code(config): - var = await binary_sensor.new_binary_sensor(config) + var = cg.new_Pvariable(config[CONF_ID]) await cg.register_component(var, config) + await binary_sensor.register_binary_sensor(var, config) await register_ratgdo_child(var, config)