Skip to content

Replace deprecated rgb_order with channel_colors - #129

Merged
ptr727 merged 1 commit into
developfrom
rgb-channel-colors
Sep 4, 2026
Merged

ptr727 merged 1 commit into
developfrom
rgb-channel-colors

Conversation

@ptr727

@ptr727 ptr727 commented Sep 4, 2026 •

Copy link
Copy Markdown
Owner

Resolves the deprecation warning reported in #125.

ESPHome 2026.8.0 added channel_colors to the light schema and deprecated rgb_order, is_rgbw and is_wrgb, scheduled for removal in 2027.3.0. Validation folded rgb_order: GRB into channel_colors: GRB and logged a warning on every config and compile of a device composing the template.

The two forms are equivalent here. light.migrate_channel_colors maps a bare rgb_order with no is_rgbw or is_wrgb straight through, so the generated light::ChannelColors struct is unchanged.

Verification

Ran against ESPHome 2026.8.2 in the esphome container, on a snapshot of this branch under the /cache mount so the live /config tree was not touched.

  • Baseline on develop reproduces the warning on hvac-compressor-sensor, and it is gone on this branch.
  • esphome config is valid with no rgb_order warning on the four templates that compose this one: test/unexpectedmaker-pros3d, test/adafruit-esp32-s3-feather, test/esp32-s3-devkitc, test/waveshare-esp32-s3-eth.
  • esphome config is valid on the live consumers: hvac-compressor-sensor, office-bluetooth-proxy, pantry-bluetooth-proxy, ble-notify-race-test.
  • The remaining GPIO3 strapping warning on the Adafruit Feather is pre-existing and unrelated to this change.

Note

channel_colors first ships in ESPHome 2026.8.0, so this raises the template's floor to that release. The template is advertised as a remote package in README.md and OPERATIONS.md, and a consumer on an older ESPHome now fails validation rather than logging a warning. Documenting or enforcing that floor is deliberately left out of this change.

Summary by CodeRabbit

  • Bug Fixes
    • Updated RGB LED strip configuration to use the supported channel color mapping format.
    • Preserved the existing GRB color order for accurate LED color output.
    • Improved compatibility with current LED strip platform configuration requirements.

ESPHome 2026.8.0 added channel_colors to the light schema and deprecated
rgb_order, is_rgbw and is_wrgb, scheduled for removal in 2027.3.0.
Validation folded rgb_order: GRB into channel_colors: GRB and logged a
warning on every config and compile of a device using the template.

The two forms are equivalent here, since migrate_channel_colors maps a
bare rgb_order with no is_rgbw or is_wrgb straight through, so the
generated ChannelColors struct is unchanged.

Refs #125
Copilot AI lite review requested due to automatic review settings September 4, 2026 19:26
@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

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: 1685af82-d9ca-48c3-983b-ff173704a218

📥 Commits

Reviewing files that changed from the base of the PR and between 92632da and 59d4bf1.

📒 Files selected for processing (1)
  • templates/rgb-led-status.yaml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The LED template replaces rgb_order: GRB with channel_colors: GRB for the esp32_rmt_led_strip platform.

Changes

LED channel configuration

Layer / File(s) Summary
Update LED channel mapping
templates/rgb-led-status.yaml
The esp32_rmt_led_strip configuration uses channel_colors: GRB instead of the deprecated rgb_order: GRB key.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 59d4b

This updates the LED template to the current channel-mapping option while retaining the GRB color order. No current merge-blocking risk is identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: replacing the deprecated rgb_order key with channel_colors.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rgb-channel-colors

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

Migrate RGB status LED to channel_colors

🐞 Bug fix ⚙️ Configuration changes 🕐 Less than 5 minutes

Grey Divider

AI Description

• Migrates RGB strip ordering to ESPHome’s supported channel_colors option.
• Removes recurring deprecation warnings while preserving the generated GRB channel mapping.
• Requires ESPHome 2026.8.0 or newer for template consumers.
High-Level Assessment

The direct schema migration is optimal because ESPHome maps the previous bare rgb_order: GRB setting equivalently while removing the warning. Retaining the deprecated option would preserve older-version compatibility but defer a required migration before its scheduled removal.

Files changed (1) +1 / -1

Other (1) +1 / -1
rgb-led-status.yamlReplace deprecated RGB channel-order setting +1/-1

Replace deprecated RGB channel-order setting

• Replaces 'rgb_order: GRB' with 'channel_colors: GRB' for the status LED. This removes ESPHome 2026.8 deprecation warnings without changing the generated channel mapping, while establishing ESPHome 2026.8.0 as the minimum supported version.

templates/rgb-led-status.yaml

@qodo-code-review

qodo-code-review Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Undocumented ESPHome version floor ✗ Dismissed 🐞 Bug ≡ Correctness
Description
Replacing rgb_order with channel_colors makes the remotely advertised package invalid on ESPHome
versions before 2026.8.0, but the README still presents the package without a version requirement.
Existing consumers can therefore begin failing configuration validation merely by tracking the
package's main branch.
Code

templates/rgb-led-status.yaml[95]

+    channel_colors: GRB
Relevance

●●● Strong

Recent precedent accepts documenting correctness hazards for remotely consumed templates, including
this exact file.

PR-#75

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The changed template now requires the channel_colors light property, while the repository
explicitly advertises the same file as a remote package using an unversioned @main reference. The
documentation says it can be consumed remotely but provides no ESPHome 2026.8.0 minimum, so older
consumers are not warned before validation fails.

templates/rgb-led-status.yaml[87-98]
README.md[130-138]
OPERATIONS.md[197-206]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The RGB LED status remote package now uses `channel_colors`, which is unavailable before ESPHome 2026.8.0. Consumers tracking the package remotely can fail validation after this change without knowing why.

## Issue Context
Document the minimum supported ESPHome version alongside the remote-package usage, and if the repository has a supported mechanism for version enforcement, apply it to the package or consuming documentation.

## Fix Focus Areas
- templates/rgb-led-status.yaml[95-95]
- README.md[130-138]
- OPERATIONS.md[197-206]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 5 rules
Review mode: 🚀 Fast: This is a single-line, localized configuration-key replacement with documented equivalence and no security, schema, or broad behavioral risk.

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

Comment thread templates/rgb-led-status.yaml Resolved

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 change is a minimal, schema-aligned migration that removes the reported deprecation warning without altering the template’s intended LED behavior.

Pull request overview

Updates the rgb-led-status ESPHome template to eliminate the rgb_order deprecation warning introduced in ESPHome 2026.8.x by switching to the new channel_colors schema field.

Changes:

  • Replace rgb_order: GRB with channel_colors: GRB for the esp32_rmt_led_strip status LED configuration.
File summaries
File Description
templates/rgb-led-status.yaml Migrates the status LED strip color ordering to channel_colors to avoid ESPHome deprecation warnings.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

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

@ptr727

ptr727 commented Sep 4, 2026

Copy link
Copy Markdown
Owner Author

Answering the one open Qodo finding, since it is tracked outside the review thread.

  1. Undocumented esphome version floor
    Replacing rgb_order with channel_colors makes the remotely advertised package invalid on ESPHome versions before 2026.8.0, but the README still presents the package without a version requirement. Existing consumers can therefore begin failing configuration validation merely by tracking the package's main branch.

Declined, with the finding's facts confirmed rather than disputed.

Verified independently: channel_colors is absent from the light schema at tag 2026.7.0 and present at 2026.8.0, and at 2026.7.x the esp32_rmt_led_strip schema still marks rgb_order required. A consumer on an older release therefore fails validation twice over, on the unknown key and on the missing required one. The diff is the single line this claim rests on, confirmed against gh pr diff.

It is declined on catalog convention rather than on the facts. No template in this repository declares an ESPHome floor, and the tree tracks whatever release the instance runs, so documenting one here alone would introduce a per-template version contract the rest of the catalog does not carry and has no convention for keeping current. Upstream removes the deprecated key in 2027.3.0 regardless, so the floor arrives either way.

The esphome min_version key was considered as an enforcing alternative and not taken, for the same reason.

Maintainer's call, made on this PR, and recorded here so a later reader finds the reasoning rather than an unanswered finding.

@ptr727
ptr727 merged commit 4f57ac1 into develop Sep 4, 2026
33 checks passed
@ptr727
ptr727 deleted the rgb-channel-colors branch September 4, 2026 19:38
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