mirror of
https://github.com/esphome/esphome.git
synced 2024-11-21 22:48:10 +01:00
Fix ESP32 touch sleep duration conversion
This commit is contained in:
parent
e650473682
commit
c82a44d541
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ def to_code(config):
|
||||||
if CONF_IIR_FILTER in config:
|
if CONF_IIR_FILTER in config:
|
||||||
add(touch.set_iir_filter(config[CONF_IIR_FILTER]))
|
add(touch.set_iir_filter(config[CONF_IIR_FILTER]))
|
||||||
if CONF_SLEEP_DURATION in config:
|
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))
|
add(touch.set_sleep_duration(sleep_duration))
|
||||||
if CONF_MEASUREMENT_DURATION in config:
|
if CONF_MEASUREMENT_DURATION in config:
|
||||||
measurement_duration = int(config[CONF_MEASUREMENT_DURATION].total_microseconds * 0.125)
|
measurement_duration = int(config[CONF_MEASUREMENT_DURATION].total_microseconds * 0.125)
|
||||||
|
|
Loading…
Reference in a new issue