diff --git a/esphome/components/esp32_touch/esp32_touch.cpp b/esphome/components/esp32_touch/esp32_touch.cpp index 0bfcadb8514..0db70df5f7c 100644 --- a/esphome/components/esp32_touch/esp32_touch.cpp +++ b/esphome/components/esp32_touch/esp32_touch.cpp @@ -7,8 +7,7 @@ #include -namespace esphome { -namespace esp32_touch { +namespace esphome::esp32_touch { static const char *const TAG = "esp32_touch"; @@ -632,7 +631,6 @@ void ESP32TouchComponent::check_and_disable_loop_if_all_released_(size_t pads_of } } -} // namespace esp32_touch -} // namespace esphome +} // namespace esphome::esp32_touch #endif // USE_ESP32 diff --git a/esphome/components/esp32_touch/esp32_touch.h b/esphome/components/esp32_touch/esp32_touch.h index c69d0aeb45f..8f476612813 100644 --- a/esphome/components/esp32_touch/esp32_touch.h +++ b/esphome/components/esp32_touch/esp32_touch.h @@ -11,8 +11,7 @@ #include #include -namespace esphome { -namespace esp32_touch { +namespace esphome::esp32_touch { // IMPORTANT: Touch detection logic differs between ESP32 variants: // - ESP32 v1 (original): Touch detected when value < threshold (absolute threshold, capacitance increase causes @@ -254,7 +253,6 @@ class ESP32TouchBinarySensor : public binary_sensor::BinarySensor { bool initial_state_published_{false}; }; -} // namespace esp32_touch -} // namespace esphome +} // namespace esphome::esp32_touch #endif