From c82a44d5412db5b5beba6924b4d677b7bc1e5ad6 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Wed, 6 Jun 2018 09:30:14 +0200 Subject: [PATCH] Fix ESP32 touch sleep duration conversion --- esphomeyaml/components/esp32_touch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphomeyaml/components/esp32_touch.py b/esphomeyaml/components/esp32_touch.py index fd9bacba55..5804a0863e 100644 --- a/esphomeyaml/components/esp32_touch.py +++ b/esphomeyaml/components/esp32_touch.py @@ -65,7 +65,7 @@ def to_code(config): if CONF_IIR_FILTER in config: add(touch.set_iir_filter(config[CONF_IIR_FILTER])) if CONF_SLEEP_DURATION in config: - sleep_duration = int(config[CONF_SLEEP_DURATION].total_microseconds * 6.6667) + sleep_duration = int(config[CONF_SLEEP_DURATION].total_microseconds * 0.15) add(touch.set_sleep_duration(sleep_duration)) if CONF_MEASUREMENT_DURATION in config: measurement_duration = int(config[CONF_MEASUREMENT_DURATION].total_microseconds * 0.125)