1
0
mirror of https://github.com/esphome/esphome.git synced 2025-06-18 22:35:40 +01:00
This commit is contained in:
Otto Winter
2018-05-14 21:13:51 +02:00
parent 3f1c41d627
commit 5c8b4d791f
10 changed files with 66 additions and 15 deletions

@ -39,7 +39,7 @@ PLATFORM_SCHEMA = binary_sensor.PLATFORM_SCHEMA.extend({
def to_code(config):
hub = get_variable(None, type='ESP32TouchComponent')
hub = get_variable(None, type='binary_sensor::ESP32TouchComponent')
touch_pad = RawExpression(TOUCH_PADS[config[CONF_PIN]])
rhs = hub.make_touch_pad(config[CONF_NAME], touch_pad, config[CONF_THRESHOLD])
device = Pvariable('ESP32TouchBinarySensor', config[CONF_ID], rhs)