Skip to content

Conversation

@marcbodea
Copy link

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.

Description:

Related issue (if applicable): n/a

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

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.
@esphome esphome bot added the current label Jan 7, 2026
@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/695ee09a2b8dc60008fb465b
😎 Deploy Preview https://deploy-preview-5872--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

Caution

Review failed

The pull request is closed.

Walkthrough

Reformatted and substantially expanded the ESP32-S2/S3 touch sensor documentation: added a "Benchmark System on S2 and S3" section, instructions to enable setup_mode and extract benchmark logs, guidance for calculating thresholds, saturation notes, and example configurations and log snippets.

Changes

Cohort / File(s) Summary
Documentation — ESP32 touch
content/components/binary_sensor/esp32_touch.md
Reflowed S2/S3 note markup and formatting; added a comprehensive "Benchmark System on S2 and S3" subsection describing the startup-calibrated benchmark, how configured thresholds combine with the benchmark to form trigger points, how to enable setup_mode and extract benchmark/difference/value from setup logs (example snippet), guidance for computing suitable thresholds, saturation/max-value note (2097151), and device/environment tuning examples.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • kbx81
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: adding documentation about the benchmark system for ESP32-S2 and S3 touch sensors, which directly matches the changeset.
Description check ✅ Passed The description is directly related to the changeset, explaining the new documentation section on the internal benchmark system for ESP32-S2 and S3 touch sensors and its purpose.
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.


📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

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

📒 Files selected for processing (1)
  • content/components/binary_sensor/esp32_touch.md

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:
- Line 303: The fenced code block at the end of the ESP32 touch sensor docs is
missing a language specifier; update the opening backtick fence from ``` to a
language-tagged fence like ```log or ```plaintext so the log output is
syntax-highlighted (locate the triple-backtick fence in the esp32_touch.md
content block and replace it with a language-tagged fence).
📜 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 5bdc6a7.

📒 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 (1)
📓 Common learnings
Learnt from: jesserockz
Repo: esphome/esphome-docs PR: 4865
File: .github/workflows/needs-docs.yml:0-0
Timestamp: 2025-05-01T03:29:47.922Z
Learning: In the esphome-docs repository, the "current" label is automatically added by a bot to pull requests, making it a reliable indicator for the target branch.
🪛 GitHub Check: Lint
content/components/binary_sensor/esp32_touch.md

[failure] 303-303:
Fenced code blocks should have a language specified [Context: "```"]

🪛 LanguageTool
content/components/binary_sensor/esp32_touch.md

[grammar] ~301-~301: Ensure spelling is correct
Context: ...eshold and the benchmark value for each touch pad. Here's an example from the logs: ``` ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~325-~325: Ensure spelling is correct
Context: ...g to the baseline > capacitance of your touch pad during startup. Always check the setup ...

(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 (1)
content/components/binary_sensor/esp32_touch.md (1)

287-327: Excellent addition of the Benchmark System documentation.

The new section clearly explains how S2/S3 benchmark calibration works, provides concrete steps for users to retrieve and interpret benchmark values, and includes a practical worked example (1372232 + 600000 = 1972232). The connection between setup-time calibration and threshold configuration is well-articulated, and the tip about cross-power-cycle consistency is helpful. The content integrates well with the existing "S2 and S3 Variants" and "Finding Thresholds" sections.

…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.
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: 0

🧹 Nitpick comments (1)
content/components/binary_sensor/esp32_touch.md (1)

301-301: Consider replacing contraction for formal documentation style.

Line 301 uses "Here's" (a contraction). If your documentation style guide prefers formal language, consider rephrasing to "Here is an example from the logs:" for consistency with formal technical documentation conventions.

✨ Optional refinement
-The setup logs will display both the configured threshold and the benchmark value for each touch pad. Here's an example from the logs:
+The setup logs will display both the configured threshold and the benchmark value for each touch pad. Here is an example from the logs:
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5bdc6a7 and d47bfc4.

📒 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 (1)
📓 Common learnings
Learnt from: jesserockz
Repo: esphome/esphome-docs PR: 4865
File: .github/workflows/needs-docs.yml:0-0
Timestamp: 2025-05-01T03:29:47.922Z
Learning: In the esphome-docs repository, the "current" label is automatically added by a bot to pull requests, making it a reliable indicator for the target branch.
🪛 LanguageTool
content/components/binary_sensor/esp32_touch.md

[grammar] ~301-~301: Ensure spelling is correct
Context: ...eshold and the benchmark value for each touch pad. Here's an example from the logs: ```l...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~325-~325: Ensure spelling is correct
Context: ...g to the baseline > capacitance of your touch pad during startup. Always check the setup ...

(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 (2)
content/components/binary_sensor/esp32_touch.md (2)

303-303: Past issue resolved: Code fence language specifier is now present.

The fenced code block at line 303 now correctly specifies log as the language identifier, addressing the previous review comment about missing language specifiers for syntax highlighting.


287-327: Technical content is clear and accurate; verify duplication per AI summary.

The new benchmark system section explains the concept well (max value during boot), provides clear steps for retrieval, includes a concrete log example with proper syntax highlighting, and walks through the calculation (benchmark + threshold = trigger point). The structure is logical and the technical details align with S2/S3 behavior.

However, the AI summary states this content is "duplicated in both places where the S2/S3 variant guidance appears," but only one instance is visible in the provided code (lines 287-327). Verify whether the benchmark section should also appear in the note box section (lines 243-268) or elsewhere in the document.

…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.
@marcbodea marcbodea closed this Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant