1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-27 13:13:50 +00:00

Binary Sensor codegen tidyup (#3217)

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

View File

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