Skip to content

Conversation

@marcbodea
Copy link

Description:

Added more detailed description of how the benchmarking system works, and how to set threshold and measurement_duration to make sure the values are within the HW limits.

Related issue (if applicable): fixes

Pull request in esphome with YAML changes (if applicable):

There are no config or yaml changes, but the logs from the example are added in this PR.

Checklist:

  • I am merging into next because this is new documentation that has a matching pull-request in esphome as linked above.
    or

  • I am merging into current because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.

  • Link added in /components/_index.md when creating new documents for new components or cookbook.

New Component Images

If you are adding a new component to ESPHome, you can automatically generate a standardized black and white component name image for the documentation.

To generate a component image:

  1. Comment on this pull request with the following command, replacing component_name with your component name in lower_case format with underscores (e.g., bme280, sht3x, dallas_temp):

    @esphomebot generate image component_name
    
  2. The ESPHome bot will respond with a downloadable ZIP file containing the SVG image.

  3. Extract the SVG file and place it in the /static/images/ folder of this repository.

  4. Use the image in your component's index table entry in /components/_index.md.

Example: For a component called "DHT22 Temperature Sensor", use:

@esphomebot generate image dht22

This update introduces a new section on the internal benchmark system for ESP32-S2 and S3 devices, explaining how it calibrates during startup and its impact on configuring touch sensor thresholds. Instructions for enabling setup mode and interpreting benchmark values from device logs are included to ensure accurate touch detection.
…ntation

This update corrects the numbering in the steps for enabling setup mode and finding benchmark values in the device logs, ensuring clarity and consistency in the documentation.
…onal notes

This update refines the formatting of notes and instructions for the ESP32-S2 and S3 touch sensor configuration. It clarifies the impact of the benchmark system on touch detection and provides guidance on adjusting the `measurement_duration` and `threshold` values. Additional details on the floating benchmark and its adaptation to environmental changes are included for better user understanding.
Copy link

@esphome esphome bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is a feature matched with a PR in https://github.com/esphome/esphome, please target your PR to the next branch and rebase.

@esphome esphome bot marked this pull request as draft January 7, 2026 22:50
@esphome
Copy link

esphome bot commented Jan 7, 2026

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@netlify
Copy link

netlify bot commented Jan 7, 2026

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit 131cd56
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/695ee31034c9310008924ec7
😎 Deploy Preview https://deploy-preview-5874--esphome.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 7, 2026

Walkthrough

Documentation improvements to the ESP32 touch binary sensor guide, including visual formatting updates to blockquote-style for notes, expanded guidance on S2/S3 benchmark thresholds, and a new subsection explaining the benchmark system with practical setup instructions and example logs.

Changes

Cohort / File(s) Summary
ESP32 Touch Documentation
content/components/binary_sensor/esp32_touch.md
Converted note/code-block formatting from list items to blockquote style; expanded S2/S3 Variants section with benchmark/threshold calculation details; added new "Benchmark System on S2 and S3" subsection with logging guidance and example logs; updated emphasis formatting (asterisks to underscores).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • esphome/esphome-docs#5049: Complements this PR by adding timing and configuration examples to the same S2/S3 touch sensor documentation section.

Suggested labels

current

Suggested reviewers

  • kbx81
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Esp32 touch s3 setup' is partially related to the changeset. While the PR does modify ESP32 touch documentation, the title is vague and lacks specific detail about the main change (adding benchmarking system documentation). Consider a more descriptive title like 'Document ESP32-S2/S3 touch sensor benchmarking system' to clearly convey the primary change.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the main purpose of the PR: adding detailed documentation about the benchmarking system for ESP32 touch sensors, including how to set thresholds and measurement duration. This is directly related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @content/components/binary_sensor/esp32_touch.md:
- Around line 275-276: Replace underscore-based emphasis with asterisk-based
emphasis in the sentence that explains sensor behavior for S2/S3 vs original
ESP32: change "_increasing_" and "_decrease_" to "*increasing*" and
"*decrease*". Edit the text in the esp32_touch.md content block (the sentence
starting with "Contact with the touch sensor...") to use asterisks for emphasis
to satisfy Markdownlint MD049.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1c5b13c and 131cd56.

📒 Files selected for processing (1)
  • content/components/binary_sensor/esp32_touch.md
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

  • Do not generate or add any sequence diagrams

Files:

  • content/components/binary_sensor/esp32_touch.md
🧠 Learnings (2)
📚 Learning: 2025-05-12T00:02:50.869Z
Learnt from: jesserockz
Repo: esphome/esphome-docs PR: 4901
File: changelog/2025.4.0.rst:124-126
Timestamp: 2025-05-12T00:02:50.869Z
Learning: In the ESPHome changelog structure, the "All changes" section should have the `:open:` attribute to be expanded by default, but the "Dependency Changes" section should NOT have this attribute as it should remain collapsed by default.

Applied to files:

  • content/components/binary_sensor/esp32_touch.md
📚 Learning: 2025-12-14T20:08:17.373Z
Learnt from: danielkent-net
Repo: esphome/esphome-docs PR: 5778
File: content/components/sensor/bmp581.md:10-12
Timestamp: 2025-12-14T20:08:17.373Z
Learning: In ESPHome documentation, sensors that support both I²C and SPI interfaces use separate platform names with `_i2c` and `_spi` suffixes (e.g., `bmp280_i2c`/`bmp280_spi`, `bmp3xx_i2c`/`bmp3xx_spi`, `bmp581_i2c`/`bmp581_spi`). This is the established naming convention and should not be flagged as incorrect.

Applied to files:

  • content/components/binary_sensor/esp32_touch.md
🪛 GitHub Actions: CI
content/components/binary_sensor/esp32_touch.md

[error] 275-275: Markdownlint MD049: Emphasis style [Expected: asterisk; Actual: underscore]

🪛 LanguageTool
content/components/binary_sensor/esp32_touch.md

[grammar] ~305-~305: Ensure spelling is correct
Context: ...nd the difference between them for each touch pad. Here's an example from the logs: ```l...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build
🔇 Additional comments (3)
content/components/binary_sensor/esp32_touch.md (3)

243-267: Blockquote formatting and S2/S3 configuration guidance look good.

The new note with example YAML provides practical guidance for users configuring S2/S3 variants. The blockquote syntax is consistent with the rest of the documentation, and the example values (0.25ms measurement_duration) align with the recommendations later in the subsection.


285-286: Hardware limit note is clear and actionable.

The note about the 2097151 maximum value provides concrete guidance with a specific remediation suggestion (0.05ms). Well-placed context for users encountering saturation.


288-316: New Benchmark System subsection is well-structured and informative.

The section effectively explains the floating benchmark mechanism with clear step-by-step guidance, realistic log example, and field-by-field breakdown. The explanation of how threshold relates to the benchmark value (threshold + benchmark comparison) is particularly helpful for users tuning S2/S3 devices. The note about environmental adaptation and dynamic benchmark behavior adds important context about why values may change over time.

Comment on lines +275 to +276
- Contact with the touch sensor on the S2 and S3 variants will result in the raw sensor value reading _increasing_; on
the original ESP32, contact would cause this value to _decrease_.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix emphasis style to use asterisks instead of underscores.

Markdownlint MD049 requires asterisks for emphasis, not underscores. Update these lines to match the expected style.

🐛 Proposed fix
- Contact with the touch sensor on the S2 and S3 variants will result in the raw sensor value reading _increasing_; on
-  the original ESP32, contact would cause this value to _decrease_.
+ Contact with the touch sensor on the S2 and S3 variants will result in the raw sensor value reading *increasing*; on
+  the original ESP32, contact would cause this value to *decrease*.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- Contact with the touch sensor on the S2 and S3 variants will result in the raw sensor value reading _increasing_; on
the original ESP32, contact would cause this value to _decrease_.
- Contact with the touch sensor on the S2 and S3 variants will result in the raw sensor value reading *increasing*; on
the original ESP32, contact would cause this value to *decrease*.
🧰 Tools
🪛 GitHub Actions: CI

[error] 275-275: Markdownlint MD049: Emphasis style [Expected: asterisk; Actual: underscore]

🤖 Prompt for AI Agents
In @content/components/binary_sensor/esp32_touch.md around lines 275 - 276,
Replace underscore-based emphasis with asterisk-based emphasis in the sentence
that explains sensor behavior for S2/S3 vs original ESP32: change "_increasing_"
and "_decrease_" to "*increasing*" and "*decrease*". Edit the text in the
esp32_touch.md content block (the sentence starting with "Contact with the touch
sensor...") to use asterisks for emphasis to satisfy Markdownlint MD049.

@marcbodea marcbodea closed this Jan 10, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Jan 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant