Binary Sensor codegen tidyup (#3217)

This commit is contained in:
Jesse Hills authored and GitHub committed 2022-02-18 10:39:59 +13:00
1 parent 3b8bb09ae3
commit 7a242bb4ed
38 files changed
+196 -222

No files matched your search

@@ -39,9 +39,8 @@ ESP32TouchBinarySensor = esp32_touch_ns.class_(
"ESP32TouchBinarySensor", binary_sensor.BinarySensor
)
CONFIG_SCHEMA = binary_sensor.BINARY_SENSOR_SCHEMA.extend(
CONFIG_SCHEMA = binary_sensor.binary_sensor_schema(ESP32TouchBinarySensor).extend(
{
cv.GenerateID(): cv.declare_id(ESP32TouchBinarySensor),
cv.GenerateID(CONF_ESP32_TOUCH_ID): cv.use_id(ESP32TouchComponent),
cv.Required(CONF_PIN): validate_touch_pad,
cv.Required(CONF_THRESHOLD): cv.uint16_t,