mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 03:12:20 +01:00
[esp32_touch] Fix variants, add tests for variants (#8320)
This commit is contained in:
15
tests/components/esp32_touch/common-variants.yaml
Normal file
15
tests/components/esp32_touch/common-variants.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
esp32_touch:
|
||||
setup_mode: false
|
||||
sleep_duration: 27ms
|
||||
measurement_duration: 8ms
|
||||
low_voltage_reference: 0.5V
|
||||
high_voltage_reference: 2.7V
|
||||
voltage_attenuation: 1.5V
|
||||
|
||||
binary_sensor:
|
||||
- platform: esp32_touch
|
||||
name: ESP32 Touch Pad
|
||||
pin: ${pin}
|
||||
threshold: 1000
|
||||
on_press:
|
||||
- logger.log: "I'm touched!"
|
@@ -10,7 +10,7 @@ esp32_touch:
|
||||
binary_sensor:
|
||||
- platform: esp32_touch
|
||||
name: ESP32 Touch Pad
|
||||
pin: 27
|
||||
pin: ${pin}
|
||||
threshold: 1000
|
||||
on_press:
|
||||
- logger.log: "I'm touched!"
|
||||
|
@@ -1 +1,4 @@
|
||||
substitutions:
|
||||
pin: GPIO27
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@@ -1 +1,4 @@
|
||||
substitutions:
|
||||
pin: GPIO27
|
||||
|
||||
<<: !include common.yaml
|
||||
|
4
tests/components/esp32_touch/test.esp32-s2-ard.yaml
Normal file
4
tests/components/esp32_touch/test.esp32-s2-ard.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
substitutions:
|
||||
pin: GPIO12
|
||||
|
||||
<<: !include common-variants.yaml
|
4
tests/components/esp32_touch/test.esp32-s2-idf.yaml
Normal file
4
tests/components/esp32_touch/test.esp32-s2-idf.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
substitutions:
|
||||
pin: GPIO12
|
||||
|
||||
<<: !include common-variants.yaml
|
4
tests/components/esp32_touch/test.esp32-s3-ard.yaml
Normal file
4
tests/components/esp32_touch/test.esp32-s3-ard.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
substitutions:
|
||||
pin: GPIO12
|
||||
|
||||
<<: !include common-variants.yaml
|
4
tests/components/esp32_touch/test.esp32-s3-idf.yaml
Normal file
4
tests/components/esp32_touch/test.esp32-s3-idf.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
substitutions:
|
||||
pin: GPIO12
|
||||
|
||||
<<: !include common-variants.yaml
|
Reference in New Issue
Block a user