Skip to content

Use core CH390 ethernet and share one min_version - #130

Merged
ptr727 merged 2 commits into
developfrom
feature/ch390-core-min-version
Sep 4, 2026
Merged

ptr727 merged 2 commits into
developfrom
feature/ch390-core-min-version

Conversation

@ptr727

@ptr727 ptr727 commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Closes #128.

CH390 from core

ESPHome shipped CH390 ethernet support in 2026.8, so ch390/components is removed and every consumer drops its external_components block:

  • templates/elecrow-thinknode-m7.yaml, plus its Required external components: header block.
  • thinknode-m7.yaml and test/elecrow-thinknode-m7.yaml.

The vendored copy was a snapshot of an older release. Core's version is a strict superset: it keeps polling_interval, and adds the network-priority and ethernet-plus-wifi coexistence work the snapshot predates.

One place for min_version

templates/min-version.yaml is new and holds the only esphome: min_version in the tree, set to 2026.8.2. Every board template reaches it, through common.yaml or through its own packages: entry, so bumping the floor edits one file rather than every template. common.yaml covers nine board templates; the seven that cannot use it (apollo-plt-1b, elecrow-thinknode-m7, gls10-bluetooth-proxy, konnected-blaq, smarthome-ceilsense, sonoff-s31, waveshare-esp32-s3-eth) include it directly.

Overlays, easystart.yaml, and the utility includes carry no copy, since they are only ever composed onto a board template. min-version is added to the workflow's UTILITY list so the matrix guard does not demand an example device for it. OPERATIONS.md gains a Minimum ESPHome Version note and README.md lists the new template.

Scratch configs removed

thinknode-m7-bench.yaml, thinknode-m7-nettest.yaml, thinknode-m7-ethid.yaml, and thinknode-m7-loraid.yaml are deleted; the hardware questions they were flashed to answer are answered. thinknode-m7.yaml stays.

Verification

On ESPHome 2026.8.2, in ptr727/esphome-nonroot:latest:

  • esphome config on all 22 test/ configs: valid.
  • esphome config on all 15 root device configs: valid.
  • esphome compile on test/elecrow-thinknode-m7.yaml: successful, against core's CH390.
  • Enforcement checked by temporarily setting the shared min_version to 2099.1.0, which failed test/sonoff-s31.yaml with Your ESPHome version is too old, so a package-supplied floor is honoured.
  • markdownlint, cspell, editorconfig-checker, and actionlint clean on a tracked-files snapshot.

🤖 Generated with Claude Code

ESPHome shipped CH390 support in 2026.8, so ch390/components, the patched
copy of the core ethernet component that added the type, is removed and the
ThinkNode M7 template, its device config, and its test config now use the
built-in component with no external_components block.

templates/min-version.yaml is the single place the esphome min_version floor
is written, set to 2026.8.2, the release the templates were last compiled
against. Every board template reaches it through common.yaml or through its
own packages entry, so a bump edits one file rather than every template.

The thinknode-m7 bench, nettest, ethid, and loraid scratch configs are
deleted, their hardware questions having been answered.

Verified on ESPHome 2026.8.2: esphome config on all 22 test configs and all
15 device configs, and esphome compile on test/elecrow-thinknode-m7.yaml.

Closes #128

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI lite review requested due to automatic review settings September 4, 2026 20:04
@qodo-code-review

Copy link
Copy Markdown

ⓘ Your Qodo trial ends soon. Ask your workspace admin to set up billing to keep reviews running after the trial. Manage billing

@coderabbitai

coderabbitai Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 13 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: 37a7d18c-50c0-4d74-800c-c54d85d4b3ad

📥 Commits

Reviewing files that changed from the base of the PR and between 4f57ac1 and c0f7d1d.

📒 Files selected for processing (28)
  • .github/workflows/test-pull-request.yml
  • OPERATIONS.md
  • README.md
  • ch390/components/ethernet/__init__.py
  • ch390/components/ethernet/automation.h
  • ch390/components/ethernet/esp_eth_phy_jl1101.c
  • ch390/components/ethernet/ethernet_component.cpp
  • ch390/components/ethernet/ethernet_component.h
  • ch390/components/ethernet/ethernet_component_esp32.cpp
  • ch390/components/ethernet/ethernet_component_rp2.cpp
  • ch390/components/ethernet/ethernet_helpers.c
  • ch390/components/ethernet/w5500_custom_spi.cpp
  • ch390/components/ethernet/w5500_custom_spi.h
  • templates/apollo-plt-1b.yaml
  • templates/common.yaml
  • templates/elecrow-thinknode-m7.yaml
  • templates/gls10-bluetooth-proxy.yaml
  • templates/konnected-blaq.yaml
  • templates/min-version.yaml
  • templates/smarthome-ceilsense.yaml
  • templates/sonoff-s31.yaml
  • templates/waveshare-esp32-s3-eth.yaml
  • test/elecrow-thinknode-m7.yaml
  • thinknode-m7-bench.yaml
  • thinknode-m7-ethid.yaml
  • thinknode-m7-loraid.yaml
  • thinknode-m7-nettest.yaml
  • thinknode-m7.yaml

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.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Adopt core CH390 and centralize ESPHome minimum version

✨ Enhancement ⚙️ Configuration changes 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Replaces vendored CH390 Ethernet support with ESPHome 2026.8 core support.
• Centralizes the 2026.8.2 minimum version across all board templates.
• Removes obsolete ThinkNode diagnostics and documents version-floor maintenance.
Diagram

graph TD
  B["Board templates"] --> C["Common package"] --> M["Version floor"] --> E["ESPHome core"]
  B --> D["Direct include"] --> M
  T["ThinkNode M7"] --> E --> H["CH390 Ethernet"]
Loading
High-Level Assessment

The selected approach is preferable: upstream ESPHome now provides a superset of the vendored CH390 implementation, eliminating local maintenance and compatibility drift. A shared package is also safer than repeating min_version across templates; retaining the snapshot or duplicating version fields would increase maintenance without adding isolation or functionality.

Files changed (14) +32 / -34

Enhancement (1) +1 / -7
elecrow-thinknode-m7.yamlUse core CH390 support and shared version enforcement +1/-7

Use core CH390 support and shared version enforcement

• Removes obsolete instructions for supplying the vendored Ethernet component and directly includes the shared minimum-version package.

templates/elecrow-thinknode-m7.yaml

Tests (1) +0 / -12
elecrow-thinknode-m7.yamlValidate ThinkNode against core CH390 support +0/-12

Validate ThinkNode against core CH390 support

• Removes the local external Ethernet component override so the test configuration resolves CH390 support from ESPHome core.

test/elecrow-thinknode-m7.yaml

Documentation (2) +12 / -1
OPERATIONS.mdDocument minimum-version maintenance rules +9/-0

Document minimum-version maintenance rules

• Explains how every board template must reach the shared version package, which configurations inherit it, and how future version bumps should be performed.

OPERATIONS.md

README.mdDescribe and list the shared version floor +3/-1

Describe and list the shared version floor

• Documents early validation on unsupported ESPHome releases and adds min-version.yaml to the shared template index.

README.md

Other (10) +19 / -14
test-pull-request.ymlExempt the minimum-version utility from example checks +1/-1

Exempt the minimum-version utility from example checks

• Adds min-version to the workflow utility list so CI does not require a standalone example device for the shared include.

.github/workflows/test-pull-request.yml

apollo-plt-1b.yamlInclude the shared ESPHome version floor +1/-0

Include the shared ESPHome version floor

• Adds the minimum-version package directly because this template does not consume common.yaml.

templates/apollo-plt-1b.yaml

common.yamlPropagate the version floor through common packages +1/-0

Propagate the version floor through common packages

• Includes min-version.yaml so every board template composed with common.yaml inherits the centralized ESPHome requirement.

templates/common.yaml

gls10-bluetooth-proxy.yamlInclude the shared ESPHome version floor +1/-0

Include the shared ESPHome version floor

• Adds the minimum-version package directly to the template's package composition.

templates/gls10-bluetooth-proxy.yaml

konnected-blaq.yamlInclude the shared ESPHome version floor +1/-0

Include the shared ESPHome version floor

• Adds the minimum-version package directly alongside the template's existing local and upstream packages.

templates/konnected-blaq.yaml

min-version.yamlDefine one ESPHome minimum version +11/-0

Define one ESPHome minimum version

• Introduces the single repository-wide min_version declaration, requiring ESPHome 2026.8.2 and documenting its package usage.

templates/min-version.yaml

smarthome-ceilsense.yamlInclude the shared ESPHome version floor +1/-0

Include the shared ESPHome version floor

• Adds the minimum-version package directly to the template's upstream package composition.

templates/smarthome-ceilsense.yaml

sonoff-s31.yamlInclude the shared ESPHome version floor +1/-0

Include the shared ESPHome version floor

• Adds the minimum-version package directly because this board template does not consume common.yaml.

templates/sonoff-s31.yaml

waveshare-esp32-s3-eth.yamlInclude the shared ESPHome version floor +1/-0

Include the shared ESPHome version floor

• Adds the minimum-version package directly to the Ethernet board template.

templates/waveshare-esp32-s3-eth.yaml

thinknode-m7.yamlRemove the vendored Ethernet override +0/-13

Remove the vendored Ethernet override

• Drops the external_components declaration and its compatibility notes, leaving the device configuration to use core CH390 support through its template.

thinknode-m7.yaml

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can route each action level your way: inline, summary, both, or drop

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The diff cleanly removes the local ethernet shadow component with no remaining references and consistently enforces a single shared min_version across all board templates.

Pull request overview

This PR updates the repository to rely on ESPHome core’s CH390 Ethernet support (removing the vendored ch390/components shadow component) and centralizes the ESPHome min_version floor into a single shared template so all device templates enforce the same minimum ESPHome release.

Changes:

  • Remove the local CH390 external component and drop all external_components blocks that referenced it.
  • Introduce templates/min-version.yaml (min_version 2026.8.2) and include it from all board templates (directly or via templates/common.yaml).
  • Delete ThinkNode M7 scratch/test configs that are no longer needed; update docs and CI guard lists accordingly.
File summaries
File Description
thinknode-m7.yaml Removes the now-unneeded local external_components override for ethernet.
thinknode-m7-nettest.yaml Deletes obsolete scratch config used for earlier network-stack testing.
thinknode-m7-loraid.yaml Deletes obsolete scratch config used for earlier LoRa identity probing.
thinknode-m7-ethid.yaml Deletes obsolete scratch config used for earlier ethernet ID probing.
thinknode-m7-bench.yaml Deletes obsolete bench config that depended on the vendored ethernet component.
test/elecrow-thinknode-m7.yaml Removes external_components override; relies on core CH390 support via template.
templates/waveshare-esp32-s3-eth.yaml Includes the shared min-version package directly (template can’t use common.yaml).
templates/sonoff-s31.yaml Includes the shared min-version package directly.
templates/smarthome-ceilsense.yaml Includes the shared min-version package directly alongside upstream vendor packages.
templates/min-version.yaml New shared package defining esphome.min_version: 2026.8.2.
templates/konnected-blaq.yaml Includes the shared min-version package directly alongside upstream vendor package.
templates/gls10-bluetooth-proxy.yaml Includes the shared min-version package directly (template uses ethernet).
templates/elecrow-thinknode-m7.yaml Removes CH390 “required external components” header and includes shared min-version directly.
templates/common.yaml Pulls in the shared min-version package so templates using common.yaml inherit the floor.
templates/apollo-plt-1b.yaml Includes the shared min-version package alongside the upstream Apollo package.
README.md Documents the shared min-version template and links it in the template catalog.
OPERATIONS.md Adds operational guidance on where/how the minimum ESPHome version is enforced.
ch390/components/ethernet/w5500_custom_spi.h Removes vendored ethernet shadow component content (now relying on core).
ch390/components/ethernet/w5500_custom_spi.cpp Removes vendored ethernet shadow component content (now relying on core).
ch390/components/ethernet/ethernet_helpers.c Removes vendored ethernet shadow component content (now relying on core).
ch390/components/ethernet/ethernet_component.h Removes vendored ethernet shadow component content (now relying on core).
ch390/components/ethernet/ethernet_component.cpp Removes vendored ethernet shadow component content (now relying on core).
ch390/components/ethernet/ethernet_component_rp2.cpp Removes vendored ethernet shadow component content (now relying on core).
ch390/components/ethernet/ethernet_component_esp32.cpp Removes vendored ethernet shadow component content (now relying on core).
ch390/components/ethernet/esp_eth_phy_jl1101.c Removes vendored ethernet shadow component content (now relying on core).
ch390/components/ethernet/automation.h Removes vendored ethernet shadow component content (now relying on core).
ch390/components/ethernet/init.py Removes vendored ethernet shadow component content (now relying on core).
.github/workflows/test-pull-request.yml Adds min-version to the UTILITY list so CI doesn’t require a test/min-version.yaml example.
Review details
  • Files reviewed: 28/28 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

The spaced hyphen in the README bullet and the lowercase package key in the
min-version.yaml usage block are the shapes the gate rejects on a changed
line. The neighbouring bullets keep their hyphens because the gate reads the
diff rather than the file.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The CH390 vendored component removal and shared min_version include are consistent across templates/docs/CI, and no remaining references to the removed ch390/components path were found.

Review details
  • Files reviewed: 28/28 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@ptr727
ptr727 merged commit ef95fc2 into develop Sep 4, 2026
33 checks passed
@ptr727
ptr727 deleted the feature/ch390-core-min-version branch September 20, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants