Repository navigation
Derive ethernet type platforms from the schema gates - #3095
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
🟡 Changes recommended
The gate-widening logic would drop USB from RP2 when its gate includes both platforms, so RP2-gated non-SPI types must be included independently of ESP32 membership.
1 open issue
What changed in this PR
This PR updates the catalog generator to derive Ethernet type availability from schema platform gates, placing the new RP2-only USB type on RP2 rather than ESP32.
Changes:
- Read per-type platform gates while preserving existing RP2 SPI restrictions.
- Update live-schema tests to check platform assignments and complete type coverage.
- Leave generated catalog JSON unchanged.
| File | Description |
|---|---|
tests/test_sync_components_ethernet_types.py |
Updates assertions for schema-derived Ethernet availability. |
script/sync_components.py |
Uses schema gates to calculate Ethernet type options by platform. |
Review effort: Balanced (adaptive)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3095 +/- ##
=======================================
Coverage 99.77% 99.77%
=======================================
Files 300 300
Lines 26564 26564
=======================================
Hits 26503 26503
Misses 61 61
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
|
Bluetooth Devices Bot (bluetoothbot)
left a comment
There was a problem hiding this comment.
Tip
No blocking issues found — ready to merge.
PR Review — Derive ethernet type platforms from the schema gatesMergeable. The forward-compat gap from the last review is fixed, and only a small defensive nit remains. The RP2 list now comes from each type's RP2 gate (
✅ Resolved since last review (1)Previously-flagged issues verified fixed
Checklist
Automated review by Kōan (Claude) |
Bluetooth Devices Bot (bluetoothbot)
left a comment
There was a problem hiding this comment.
Tip
No blocking issues found — ready to merge.

What does this implement/fix?
Ethernet's per-platform
typechoices now come from each type'scv.only_ongate in the schema, so the new RP2-onlyUSBtype (esphome/esphome#23138) is offered on RP2 instead of on ESP32.USBand ESP32 no longer lists it.RP2_ETHERNET_TYPES(that name is kept there).Details
The ESP32 SPI chips (DM9051, CH390, KSZ8851SNL) share an SPI schema gated to ESP32 and RP2; esphome's
_validatekeeps them off RP2, soRP2_ETHERNET_TYPESstays the base of the RP2 list.The live-schema test no longer pins the old constant arithmetic: it checks the RP2-only chips and
USBland only on RP2, DM9051 stays off RP2, and every type lands on some platform. It passes against esphome dev and against the esphome/esphome#23138 head. The shipped catalog JSON is not regenerated here.Related issue or feature (if applicable):
Types of changes
bugfixnew-featureenhancementbreaking-changerefactordocsmaintenancecidependenciesFrontend coordination
Checklist
ruff,codespell, yaml/json/python checks).tests/where applicable.components.index.json/definitions/components/*.jsonhave not been hand-edited (regenerate viascript/sync_components.pyif a sync is needed).docs/ARCHITECTURE.mdand/ordocs/API.md.