-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Esp32 touch s3 setup #5874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Esp32 touch s3 setup #5874
Conversation
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.
There was a problem hiding this 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.
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
✅ Deploy Preview for esphome ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
WalkthroughDocumentation 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
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ 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. Comment |
There was a problem hiding this 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
📒 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.
| - 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_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| - 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.
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
nextbecause this is new documentation that has a matching pull-request in esphome as linked above.or
I am merging into
currentbecause 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.mdwhen 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:
Comment on this pull request with the following command, replacing
component_namewith your component name in lower_case format with underscores (e.g.,bme280,sht3x,dallas_temp):The ESPHome bot will respond with a downloadable ZIP file containing the SVG image.
Extract the SVG file and place it in the
/static/images/folder of this repository.Use the image in your component's index table entry in
/components/_index.md.Example: For a component called "DHT22 Temperature Sensor", use: