binary sensor

This commit is contained in:
J. Nick Koston 2023-06-07 11:04:56 -05:00
parent 9017d3f9e8
commit b9cc7d2522
No known key found for this signature in database
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import esphome.codegen as cg import esphome.codegen as cg
import esphome.config_validation as cv import esphome.config_validation as cv
from esphome.const import CONF_ID
from esphome.components import binary_sensor from esphome.components import binary_sensor
from .. import ( from .. import (
ratgdo_ns, ratgdo_ns,
@ -22,6 +23,7 @@ CONFIG_SCHEMA = binary_sensor.BINARY_SENSOR_SCHEMA.extend(
async def to_code(config): 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 cg.register_component(var, config)
await binary_sensor.register_binary_sensor(var, config)
await register_ratgdo_child(var, config) await register_ratgdo_child(var, config)