From e6504736822a4bdf385c7ada433dd3f9bcb273b7 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Wed, 6 Jun 2018 09:26:56 +0200 Subject: [PATCH] Fix ESP32 touch ID issue --- esphomeyaml/components/esp32_touch.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/esphomeyaml/components/esp32_touch.py b/esphomeyaml/components/esp32_touch.py index 2cd08087ae..fd9bacba55 100644 --- a/esphomeyaml/components/esp32_touch.py +++ b/esphomeyaml/components/esp32_touch.py @@ -41,7 +41,10 @@ VOLTAGE_ATTENUATION = { '0V': global_ns.TOUCH_HVOLT_ATTEN_0V, } +ESP32TouchComponent = binary_sensor.binary_sensor_ns.ESP32TouchComponent + CONFIG_SCHEMA = vol.Schema({ + cv.GenerateID(): cv.declare_variable_id(ESP32TouchComponent), vol.Optional(CONF_SETUP_MODE): cv.boolean, vol.Optional(CONF_IIR_FILTER): cv.positive_time_period_milliseconds, vol.Optional(CONF_SLEEP_DURATION): @@ -53,8 +56,6 @@ CONFIG_SCHEMA = vol.Schema({ vol.Optional(CONF_VOLTAGE_ATTENUATION): validate_voltage(VOLTAGE_ATTENUATION), }) -ESP32TouchComponent = binary_sensor.binary_sensor_ns.ESP32TouchComponent - def to_code(config): rhs = App.make_esp32_touch_component()