mirror of
https://github.com/esphome/esphome.git
synced 2025-09-16 10:12:21 +01:00
cleanup
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user