mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 06:33:51 +00:00
[esp32_touch] Restore get_value() for ESP32-S2/S3 variants (#10112)
This commit is contained in:
18
tests/components/esp32_touch/common-get-value.yaml
Normal file
18
tests/components/esp32_touch/common-get-value.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
binary_sensor:
|
||||
- platform: esp32_touch
|
||||
name: ESP32 Touch Pad Get Value
|
||||
pin: ${pin}
|
||||
threshold: 1000
|
||||
id: esp32_touch_pad_get_value
|
||||
on_press:
|
||||
then:
|
||||
- lambda: |-
|
||||
// Test that get_value() compiles and works
|
||||
uint32_t value = id(esp32_touch_pad_get_value).get_value();
|
||||
ESP_LOGD("test", "Touch value on press: %u", value);
|
||||
on_release:
|
||||
then:
|
||||
- lambda: |-
|
||||
// Test get_value() on release
|
||||
uint32_t value = id(esp32_touch_pad_get_value).get_value();
|
||||
ESP_LOGD("test", "Touch value on release: %u", value);
|
||||
Reference in New Issue
Block a user