8000 8000
Skip to content

[openthread] channel range, fix typo, use C++17 nested namespace syntax - #12422

Merged
swoboda1337 merged 1 commit into
esphome:devfrom
ximex:improve-openthread
Dec 17, 2025
Merged

[openthread] channel range, fix typo, use C++17 nested namespace syntax#12422
swoboda1337 merged 1 commit into
esphome:devfrom
ximex:improve-openthread

Conversation

@ximex
@ximex ximex commented Dec 11, 2025
Copy link
Copy Markdown
Contributor

What does this implement/fix?

  • set channel range
  • fix typo
  • use C++17 nested namespace syntax

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Developer breaking change (an API change that could break external components)
  • Code quality improvements to existing code or addition of tests
  • Other

Related issue or feature (if applicable):

  • fixes

Pull request in esphome-docs with documentation (if applicable):

  • esphome/esphome-docs#

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040
  • BK72xx
  • RTL87xx
  • nRF52840

Example entry for config.yaml:

# Example config.yaml

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

Copilot AI review requested due to automatic review settings December 11, 2025 08:19
@github-actions
Copy link
Copy Markdown
Contributor

To use the changes from this PR as an external component, add the following to your ESPHome configuration YAML file:

external_components:
  - source: github://pr#12422
    components: [openthread, openthread_info]
    refresh: 1h

(Added by the PR bot)

@github-actions
Copy link
Copy Markdown
Contributor

👋 Hi there! This PR modifies 4 file(s) with codeowners.

@mrene - As codeowner(s) of the affected files, your review would be appreciated! 🙏

Note: Automatic review request may have failed, but you're still welcome to review.

@codecov-commenter
codecov-commenter commented Dec 11, 2025
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.58%. Comparing base (74218bc) to head (97eab4b).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev   #12422   +/-   ##
=======================================
  Coverage   72.58%   72.58%           
=======================================
  Files          53       53           
  Lines       11192    11192           
  Branches     1517     1517           
=======================================
  Hits         8124     8124           
  Misses       2675     2675           
  Partials      393      393           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment
Copy link
Copy Markdown
Contributor

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 modernizes the OpenThread component code with three distinct improvements: adopting C++17 nested namespace syntax, fixing a typo in a comment, and adding proper channel range validation for IEEE 802.15.4.

  • Converted all namespace declarations from nested style to C++17 nested namespace syntax (namespace esphome::openthread)
  • Fixed 8000 typo "suport" → "support" in TODO comment
  • Added channel range validation (11-26) for OpenThread configuration

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
esphome/components/openthread_info/openthread_info_text_sensor.h Converted namespace declarations to C++17 syntax
esphome/components/openthread_info/openthread_info_text_sensor.cpp Converted namespace declarations to C++17 syntax
esphome/components/openthread/openthread_esp.cpp Converted namespace declarations to C++17 syntax
esphome/components/openthread/openthread.h Converted namespace declarations to C++17 syntax
esphome/components/openthread/openthread.cpp Converted namespace declarations to C++17 syntax
esphome/components/openthread/__init__.py Fixed typo in comment and added channel range validation for IEEE 802.15.4

@github-actions
Copy link
Copy Markdown
Contributor

Memory Impact Analysis

Components: openthread, openthread_info
Platform: esp32-c6-idf

Metric Target Branch This PR Change
RAM 83,424 bytes 83,424 bytes ➡️ +0 bytes (0.00%)
Flash 1,405,404 bytes 1,405,404 bytes ➡️ +0 bytes (0.00%)

Note: This analysis measures static RAM and Flash usage only (compile-time allocation).
Dynamic memory (heap) cannot be measured automatically.
⚠️ You must test this PR on a real device to measure free heap and ensure no runtime memory issues.

This analysis runs automatically when components change. Memory usage is measured from a merged configuration with 2 components.

@swoboda1337
swoboda1337 merged commit 9727c71 into esphome:dev Dec 17, 2025
42 checks passed
@ximex
ximex deleted the improve-openthread branch December 17, 2025 00:48
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 18, 2025
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.

4 participants

0