Skip to content

Add onboard RGB LED outputs to Seeed XIAO nRF52840 recommended components - #2995

Merged
J. Nick Koston (bdraco) merged 2 commits into
esphome:mainfrom
tomaszduda23:xia_ble_pinout
Nov 5, 2026
Merged

J. Nick Koston (bdraco) merged 2 commits into
esphome:mainfrom
tomaszduda23:xia_ble_pinout

Conversation

@tomaszduda23

Copy link
Copy Markdown
Contributor

What does this implement/fix?

Adds the Seeed XIAO nRF52840 (xiao_ble) onboard RGB LED to the board's Recommended components. Each colour is its own binary output.gpio:

id pin
led_red P0.26
led_green P0.30
led_blue P0.6
  • The LED is active low, so inverted: true is set on each output.
  • Pins use the short P0.x form the editor writes for nRF52 boards, and each preset locks its pin.
  • The pins are not marked reserved, so they can still be picked for other components.

The rest of the manifest is unchanged. The pin map is still filled in by the sync (pins: []), and board_bodies/xiao_ble.json and featured_components.index.json were regenerated with script/update_board.py xiao_ble.

Example of what the dashboard adds:

output:
  - platform: gpio
    id: led_red
    pin: P0.26
    inverted: true

Types of changes

  • Bugfix (non-breaking change which fixes an issue) — bugfix
  • New feature (non-breaking change which adds functionality) — new-feature
  • Enhancement to an existing feature — enhancement
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) — breaking-change
  • Refactor (no behaviour change) — refactor
  • Documentation only — docs
  • Maintenance / chore — maintenance
  • CI / workflow change — ci
  • Dependencies bump — dependencies

Frontend coordination

  • No frontend change needed
  • Companion frontend PR: esphome/device-builder-frontend#

Checklist

  • The code change is tested and works locally.
  • Pre-commit hooks pass (ruff, codespell, yaml/json/python checks).
  • Tests have been added or updated under tests/ where applicable.
  • components.index.json / definitions/components/*.json have not been hand-edited (regenerate via script/sync_components.py if a sync is needed).
  • Architecture-level changes are reflected in docs/ARCHITECTURE.md and/or docs/API.md.

Three output.gpio entries (red P0.26, green P0.30, blue P0.6), active
low, with allow_other_uses so the pins stay assignable elsewhere. The
validator now checks presets against the generated body's pins when a
manifest leaves pins empty for the sync to fill.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Tt1r6qPmeAc3fab3P8ZKWa
Pins are written as P0.26 / P0.30 / P0.6 to match how the editor emits
nRF52 pins, with inverted set on the output instead of the pin. Drops
allow_other_uses and the validator fallback it needed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Tt1r6qPmeAc3fab3P8ZKWa
@github-actions github-actions Bot added the enhancement Improvement to an existing feature label Nov 1, 2026
@codspeed

codspeed Bot commented Nov 1, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 28 untouched benchmarks
⏩ 1 skipped benchmark1


Comparing tomaszduda23:xia_ble_pinout (d924a77) with main (32d5a59)

Open in CodSpeed

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports. ↩

@codecov

codecov Bot commented Nov 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.76%. Comparing base (32d5a59) to head (d924a77).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2995   +/-   ##
=======================================
  Coverage   99.76%   99.76%           
=======================================
  Files         300      300           
  Lines       26430    26430           
=======================================
  Hits        26368    26368           
  Misses         62       62           
Flag Coverage Δ
py3.12 99.72% <ø> (-0.01%) ⬇️
py3.14 99.61% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tomaszduda23

Copy link
Copy Markdown
Contributor Author

ESPHome Bot (@esphbot) review

@esphbot

Copy link
Copy Markdown
Contributor

PR Review — Add onboard RGB LED outputs to Seeed XIAO nRF52840 recommended components

Clean, data-only catalog addition with no issues found. Merge-ready.

What the PR does well:

  • The pins match the Seeed XIAO nRF52840 schematic. Red is P0.26, green is P0.30 and blue is P0.06, and the LED is active low, so inverted: true is correct on all three.
  • The manifest is hand-edited, which is allowed because the board catalog is curated. The generated files board_bodies/xiao_ble.json and featured_components.index.json match what script/update_board.py produces. _stamp_featured_locked_pins in script/sync_boards.py turned the short P0.x strings into locked_pins values 26, 30 and 6, which match the gpio numbers in the board's synced pin map.
  • Each preset locks its pin, which is how other boards do it (for example xiaomi_gateway_3 and wyze_bulb_color). The pins are not marked reserved, so they can still be used for other components, as the description says.
  • The diff matches the PR description, with no extra changes.

Notes (not blocking):

  • These are the first board presets that use P0.x string pins instead of integers. The generated output shows they resolve correctly. No test checks that conversion yet, but this PR changes no code, so that test belongs in a separate PR.

Checklist

  • Generated catalog files consistent with manifest (not hand-edited)
  • Pin assignments correct for hardware
  • PR description matches diff
  • No hardcoded secrets

Automated review by Kōan (Claude) HEAD=d924a77 36s

@esphbot ESPHome Bot (esphbot) 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.

Tip

No blocking issues found — ready to merge.

@esphbot

Copy link
Copy Markdown
Contributor

Note

No code changes since the last review (d924a77) — skipping. Push new commits or re-request a review to run again.

@bdraco
J. Nick Koston (bdraco) merged commit 89a2a80 into esphome:main Nov 5, 2026
23 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement Improvement to an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants