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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user