Skip to content

Conversation

@Kappawaii
Copy link

@Kappawaii Kappawaii commented Nov 28, 2025

…S3 variants

Description:

Related issue (if applicable): fixes

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

  • esphome/esphome#

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.rst 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 UPPER_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 images/ folder of this repository.

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

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

@esphomebot generate image DHT22

@esphome esphome bot added the current label Nov 28, 2025
@netlify
Copy link

netlify bot commented Nov 28, 2025

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit ff3ba45
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/692a349ae6f9020008fa8ca5
😎 Deploy Preview https://deploy-preview-5692--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 Nov 28, 2025

Walkthrough

Expanded ESP32 touch sensor documentation for S2/S3 variants with explicit tuning starting points for measurement_duration and voltage_attenuation, plus diagnostic guidance when threshold-finding logs show "Event received, mask = 0x10".

Changes

Cohort / File(s) Summary
ESP32 Touch Sensor Documentation
content/components/binary_sensor/esp32_touch.md
Expanded S2/S3 Variants section: reiterates default 8ms measurement_duration is too high, adds starting-point guidance for voltage_attenuation (1.5V) and very low measurement_duration (0.01ms), and includes diagnostic troubleshooting when threshold-finding logs report Event received, mask = 0x10

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Documentation-only change, single file.
  • Rapid review: check clarity and accuracy of tuning values and log message quoting.

Possibly related PRs

Suggested reviewers

  • kbx81

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title directly addresses the main change: adding guidance/notice for ESP32-S2/S3 capacitive touch setup in the documentation.
Description check ✅ Passed The description is related to the changeset, indicating this is a documentation fix/change for current documentation, though it contains unfilled template placeholders.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7423a57 and ff3ba45.

📒 Files selected for processing (1)
  • content/components/binary_sensor/esp32_touch.md (1 hunks)
🧰 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] ~253-~253: Ensure spelling is correct
Context: ...ement duration required** - the default 8ms is often too high for S2/S3. > > On som...

(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)

255-256: Acknowledge punctuation fix; verify wording on diagnostic guidance.

Line 255 now correctly ends with a period—good catch on that fix. However, line 256's diagnostic guidance could still benefit from clarification to more directly connect the symptom to the solution. The current phrasing ("it means the sensor value being read is too high, and you should raise voltage attenuation, or lower the measurement duration") could be more concise and actionable.

Per a prior review, consider whether the wording on line 256 should be simplified to more clearly guide users, such as: "If you see Event received, mask = 0x10 messages during threshold finding, reduce the measurement duration or increase voltage attenuation to lower the sensor readings."

Would you like me to apply this clarifying rewording, or does the current explanation work as intended?


253-253: Static analysis false positive on line 253.

The static analysis tool flagged a potential spelling issue on line 253, but the current text reads correctly: "the default 8ms is often too high for S2/S3." This appears to be a false positive and can be safely ignored.


243-271: Good expansion of S2/S3 guidance with concrete starting points.

The new NOTE block provides clear, practical guidance for ESP32-S3 users, including specific measurement_duration and voltage_attenuation starting values. The diagnostic guidance for Event received, mask = 0x10 messages and the example configuration are valuable additions that should help users troubleshoot issues more efficiently. The structure using a callout box and example YAML makes the guidance easy to follow.

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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

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

258-271: Example configuration uses outdated timing—consider updating to reflect new guidance.

The example YAML at lines 260–264 uses measurement_duration: 0.25ms and sleep_duration: 0.5ms. Given the new guidance recommending 0.01ms or lower for some ESP32-S3 variants, consider whether this example should be revised to reflect the more aggressive starting point, or clarify in a comment that 0.25ms is a conservative fallback if 0.01ms does not work.

Apply this diff to add clarifying context:

>   ```yaml
>   esp32_touch:
>     setup_mode: false
>-    measurement_duration: 0.25ms  # Much lower than the 8ms default
>-    sleep_duration: 0.5ms
>+    measurement_duration: 0.25ms  # Much lower than the 8ms default; try 0.01ms for some S3 variants
>+    sleep_duration: 0.5ms
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5d943bb and 7423a57.

📒 Files selected for processing (1)
  • content/components/binary_sensor/esp32_touch.md (1 hunks)
🧰 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] ~253-~253: Ensure spelling is correct
Context: ...ement duration required** - the default 8ms is often too high for S2/S3. > > On so...

(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)

253-272: Recommended starting-point values lack documented verification across ESP32-S3 variants.

The suggested 0.01ms measurement_duration and 1.5V voltage_attenuation are technically feasible per Espressif specifications (1.5V is a standard attenuation option; 0.01ms ≈ 80 charge/discharge cycles at the 8 MHz timer), but official documentation indicates no universal starting values exist. Espressif recommends ~1ms measurement time and emphasizes per-pad, per-hardware tuning in the actual deployment environment due to noise and accuracy trade-offs. ESPHome's own example uses 0.25ms (less aggressive than the suggested 0.01ms). Without documented testing across specific variants (ESP32-S3, ESP32-S3-WROOM, ESP32-S3-MINI), users applying these values risk suboptimal or unstable configurations.

Clarify whether these are empirically validated for the stated variants, and consider linking to Espressif's touch-sensor tuning methodology or noting that these are aggressive starting points requiring adjustment per hardware.

Comment on lines 255 to 257
> On some ESP32-S3 variants, a value of **0.01ms** or lower with the use of **voltage_attenuation: 1.5V** seems a good starting point
> If you see some `Event received, mask = 0x10` messages during threshold finding, it means the sensor value being read is too high, and you should raise voltage attenuation, or lower the measurement duration.
>
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 | 🟡 Minor

Add missing period and clarify diagnostic guidance.

Line 256 is missing a closing period: "seems a good starting point" should end with a period before the next sentence begins. Additionally, the diagnostic guidance on line 257 could be clearer—the explanation "sensor value being read is too high" may need elaboration. Consider rephrasing to explicitly connect the mask=0x10 event to what it signifies (e.g., "event detected during calibration") and why raising attenuation or lowering measurement duration resolves it.

Apply this diff to fix the punctuation and improve clarity:

- On some ESP32-S3 variants, a value of **0.01ms** or lower with the use of **voltage_attenuation: 1.5V** seems a good starting point
- If you see some `Event received, mask = 0x10` messages during threshold finding, it means the sensor value being read is too high, and you should raise voltage attenuation, or lower the measurement duration.
+ On some ESP32-S3 variants, a value of **0.01ms** or lower with the use of **voltage_attenuation: 1.5V** seems a good starting point.
+ If you see `Event received, mask = 0x10` messages during threshold finding, reduce the measurement duration or increase voltage attenuation to lower the sensor readings.
📝 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
> On some ESP32-S3 variants, a value of **0.01ms** or lower with the use of **voltage_attenuation: 1.5V** seems a good starting point
> If you see some `Event received, mask = 0x10` messages during threshold finding, it means the sensor value being read is too high, and you should raise voltage attenuation, or lower the measurement duration.
>
> On some ESP32-S3 variants, a value of **0.01ms** or lower with the use of **voltage_attenuation: 1.5V** seems a good starting point.
> If you see `Event received, mask = 0x10` messages during threshold finding, reduce the measurement duration or increase voltage attenuation to lower the sensor readings.
>
🤖 Prompt for AI Agents
In content/components/binary_sensor/esp32_touch.md around lines 255 to 257, add
a missing period at the end of the sentence "seems a good starting point." and
reword the diagnostic guidance so it explicitly states that the `Event received,
mask = 0x10` message indicates the touch sensor triggered an event during
threshold calibration because the measured value is too high; instruct the
reader to raise voltage_attenuation (to reduce the measured signal) or shorten
the measurement duration (to lower the measured value) to prevent the
calibration event, and ensure the sentences are punctuated and flow clearly.

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.

2 participants