binary sensor

This commit is contained in:
J. Nick Koston 2023-06-07 11:20:14 -05:00
parent 4f0166e357
commit 2425a0db92
No known key found for this signature in database
1 changed files with 2 additions and 3 deletions

View File

@ -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)