[esp32_touch] Support voltage_attenuation with new unified driver

The new touch_volt_lim_h_t enum combines high_voltage_reference and
voltage_attenuation into a single value. Map the two user-facing config
options to the correct combined enum using a lookup table.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jonathan Swoboda
2026-02-17 22:49:20 -05:00
co-authored by Claude Opus 4.6
parent 5818d03378
commit e65438b27c
3 changed files with 70 additions and 20 deletions
@@ -4,7 +4,6 @@ esp32_touch:
measurement_duration: 8ms
low_voltage_reference: 0.5V
high_voltage_reference: 2.7V
voltage_attenuation: 1.5V
binary_sensor:
- platform: esp32_touch