diff --git a/components/ratgdo/binary_sensor/__init__.py b/components/ratgdo/binary_sensor/__init__.py index 32ff065..5bac50f 100644 --- a/components/ratgdo/binary_sensor/__init__.py +++ b/components/ratgdo/binary_sensor/__init__.py @@ -18,7 +18,10 @@ TYPES = {"motion", "obstruction"} CONFIG_SCHEMA = binary_sensor.BINARY_SENSOR_SCHEMA.extend( - {cv.Required(CONF_TYPE): str} + { + cv.GenerateID(): cv.declare_id(RATGDOBinarySensor), + cv.Required(CONF_TYPE): str + } ).extend(cv.COMPONENT_SCHEMA)