Skip to content

Conversation

@lboue
Copy link
Contributor

@lboue lboue commented Oct 24, 2025

Added configuration example for OpenThread text sensors.

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

Added configuration example for OpenThread text sensors.
@esphome esphome bot added the current label Oct 24, 2025
@netlify
Copy link

netlify bot commented Oct 24, 2025

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit 43dd20c
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/690c1b11f779210008ae2685
😎 Deploy Preview https://deploy-preview-5524--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.

@lboue lboue marked this pull request as ready for review October 28, 2025 16:27
Copilot AI review requested due to automatic review settings October 28, 2025 16:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a configuration example section for OpenThread text sensors to the documentation. The example demonstrates how to configure various Thread network information sensors using the openthread_info platform.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 28, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds documentation assets: a new text-sensor doc for the OpenThread info platform and a "See Also" subsection in the OpenThread component doc; also registers the new text sensor in the components index. No code or public API signatures changed.

Changes

Cohort / File(s) Change Summary
OpenThread component doc
content/components/openthread.md
Added a "See Also" subsection under the OpenThread Device Type section linking related docs and resources.
OpenThread text sensor documentation (new)
content/components/text_sensor/openthread_info.md
Added new documentation file describing the openthread_info text_sensor platform with front matter, YAML example, optional configuration keys (ip_address, channel, role, rloc16, ext_addr, eui64, network_name, network_key, pan_id, ext_pan_id), a security note for network_key, and cross-references.
Public components index
content/components/_index.md
Added entries for "OpenThread Info" in the Text Sensor listings and the Text Sensor Components table (path components/text_sensor/openthread_info, icon openthread.png).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Documentation-only changes across a few files; low complexity but verify links, front matter, and index entries.
  • Items to spot-check:
    • content/components/openthread.md — link targets and placement of "See Also".
    • content/components/text_sensor/openthread_info.md — front matter, YAML example formatting, and the security note for network_key.
    • content/components/_index.md — index entries and icon path.

Suggested reviewers

  • ssieb

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding OpenThread text sensors configuration example. It is concise, clear, and directly related to the changeset.
Description check ✅ Passed The description is related to the changeset, stating 'Added configuration example for OpenThread text sensors,' which aligns with the changes made across the documentation files.
✨ 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 b6cc5ad and 43dd20c.

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

⚙️ CodeRabbit configuration file

  • Do not generate or add any sequence diagrams

Files:

  • content/components/_index.md
🔇 Additional comments (1)
content/components/_index.md (1)

985-985: Index entry correctly positioned and formatted.

The new "OpenThread Info" text sensor entry is properly placed in alphabetical order within the Text Sensor Components section, uses the correct icon matching the OpenThread branding, and follows the standard imgtable format.


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.

@lboue
Copy link
Contributor Author

lboue commented Oct 28, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds a new subsection to OpenThread documentation demonstrating text sensor configuration. Includes a YAML example showing how to configure the openthread_info platform with fields such as ip_address, channel, role, rloc16, ext_addr, eui64, network_name, network_key, pan_id, and ext_pan_id.

Changes

Cohort / File(s) Change Summary
OpenThread documentation expansion
content/components/openthread.md Added new subsection "OpenThread text sensors configuration" with YAML example demonstrating text sensor setup for openthread_info platform

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Documentation-only change with no logic modifications
  • Straightforward addition of configuration example

Suggested reviewers

  • ssieb
  • swoboda1337

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "Add OpenThread text sensors configuration example" accurately and clearly describes the main change in the changeset. The raw summary confirms that the PR adds a new subsection for OpenThread text sensors configuration with YAML examples demonstrating how to configure text_sensor platform openthread_info with various fields. The title is concise, specific, and provides sufficient clarity for someone reviewing the commit history to understand the primary change without ambiguity.
Description Check ✅ Passed The pull request description states "Added configuration example for OpenThread text sensors," which directly relates to the changeset. The raw summary confirms that the PR adds a new subsection with YAML configuration examples for OpenThread text sensors, including fields like ip_address, channel, role, and other parameters. While the description is brief, it is specific and accurately describes the content of the change, and it is not vague or generic.
✨ 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 7dbc603 and 555d1b1.

📒 Files selected for processing (1)

  • content/components/openthread.md (1 hunks)

🧰 Additional context used
📓 Path-based instructions (1)
**
⚙️ CodeRabbit configuration file

  • Do not generate or add any sequence diagrams

Files:

  • content/components/openthread.md

🔇 Additional comments (1)

content/components/openthread.md (1)> 80-107: Well-structured documentation addition.

The new OpenThread text sensors configuration section follows documentation conventions. The YAML example is syntactically correct, properly formatted, and demonstrates all key fields (ip_address, channel, role, rloc16, ext_addr, eui64, network_name, network_key, pan_id, ext_pan_id) for the openthread_info platform. The introductory text is clear and grammatically sound.

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.

@coderabbitai generate docstrings

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 28, 2025

✅ Actions performed

Initiated docstring generation; will generate only if new commits exist.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 28, 2025

Caution

Docstrings generation - FAILED

No docstrings were generated.

@swoboda1337
Copy link
Member

swoboda1337 commented Nov 6, 2025

@lboue this is a separate platform so should be in a separate doc, see wifi_info as an example, please review my changes. Thanks

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 555d1b1 and 7d522f0.

📒 Files selected for processing (2)
  • content/components/openthread.md (1 hunks)
  • content/components/text_sensor/openthread_info.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • content/components/openthread.md
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

  • Do not generate or add any sequence diagrams

Files:

  • content/components/text_sensor/openthread_info.md
🔇 Additional comments (4)
content/components/text_sensor/openthread_info.md (4)

13-37: Configuration example is well-structured and comprehensive.

The YAML example demonstrates all available text sensor fields with descriptive names following ESPHome conventions. The indentation and formatting are correct.


39-75: Configuration variables are thoroughly documented with appropriate security warnings.

Each variable has clear technical descriptions, and the security warning for network_key (lines 66-69) is appropriately placed and detailed, warning about credential exposure and recommending debug-only use. The references to common Text Sensor options are consistent throughout.


1-81: Documentation is comprehensive and follows ESPHome conventions.

The file provides clear introduction, complete YAML example, detailed configuration variable documentation with appropriate security warnings, and proper cross-references. The structure and formatting are consistent with ESPHome text sensor documentation standards.


77-81: All reference links are correctly formatted and valid.

The verification confirms that the "See Also" section uses the correct documentation conventions:

  • Line 79: /components/openthread references the existing openthread.md file
  • Line 80: /components/text_sensor/index correctly references content/components/text_sensor/_index.md (Hugo routes _index.md as index)
  • Line 81: The apiref format matches the pattern used throughout the codebase for external API header file references

All paths are properly formatted with leading slashes for docref and follow the established ESPHome documentation style.

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