1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-16 10:12:21 +01:00
This commit is contained in:
J. Nick Koston
2025-06-12 15:45:47 -05:00
parent eae0d90a1e
commit 9b0d01e03f
2 changed files with 4 additions and 4 deletions

View File

@@ -270,8 +270,6 @@ void ESP32TouchComponent::loop() {
touch_pad_read_benchmark(child->get_touch_pad(), &value);
}
child->value_ = value;
// For S2/S3 v2, higher value means touched (opposite of v1)
bool is_touched = value > child->get_threshold();
child->last_state_ = is_touched;
@@ -307,8 +305,6 @@ void ESP32TouchComponent::loop() {
touch_pad_read_benchmark(event.pad, &value);
}
child->value_ = value;
// Update state if changed
if (child->last_state_ != is_touch_event) {
child->last_state_ = is_touch_event;