Skip to content

Conversation

@P-R-O-C-H-Y
Copy link
Member

Description of Change

This pull request adds support for multiple color modes to the ZigbeeColorDimmableLight class, including RGB/XY, HSV, and Color Temperature, with new configuration, control, and callback mechanisms. The documentation and example code have been updated to reflect these enhancements, and new keywords and constants have been added for improved code completion and clarity.

ZigbeeColorDimmableLight color mode support

  • Added support for multiple color modes (RGB/XY, HSV, Color Temperature) in ZigbeeColorDimmableLight, including new internal attributes, state tracking, and capability configuration. [1] [2]
  • Introduced mode-specific callback functions (onLightChangeRgb, onLightChangeHsv, onLightChangeTemp) and automatic color mode switching based on the control method used. Legacy onLightChange is now deprecated.
  • All set/get methods now validate and respect the enabled color capabilities, returning false and logging errors if unsupported operations are attempted. [1] [2] [3]

Documentation and example updates

  • Expanded documentation to describe new color modes, capabilities, configuration, and callback usage, including practical examples and use cases. [1] [2] [3] [4] [5] [6]
  • Updated the example Zigbee_Color_Dimmable_Light.ino to demonstrate both RGB and Color Temperature support, including conversion helpers and callback implementations for each mode. [1] [2] [3] [4]

Internal logic and attribute management

  • Added new attributes for color temperature, min/max temperature, color mode, and capabilities to the Zigbee cluster and internal state, ensuring correct initialization and state restoration. [1] [2]
  • Refactored attribute setters and event handlers to use the correct callback depending on the current color mode, improving reliability and maintainability.

These changes make the Zigbee color dimmable light endpoint significantly more flexible and robust, supporting a wide range of lighting devices and use cases.

Test Scenarios

Tested using updated example using ESP32C6 and HomeAssistant (ZHA). All options are visible - Level, RGB and Temperature
Screenshot 2025-12-02 at 13 58 40 Screenshot 2025-12-02 at 13 58 44 Screenshot 2025-12-02 at 13 58 50

Related links

Related to #12031
Closes #11654

@P-R-O-C-H-Y P-R-O-C-H-Y self-assigned this Dec 2, 2025
@P-R-O-C-H-Y P-R-O-C-H-Y added Status: Review needed Issue or PR is awaiting review Area: Zigbee Issues and Feature Request about Zigbee labels Dec 2, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

Warnings
⚠️

Some issues found for the commit messages in this PR:

  • the commit message "Apply suggestions from code review":
    • summary looks empty
    • type/action looks empty
  • the commit message "Apply suggestions from code review":
    • summary looks empty
    • type/action looks empty

Please fix these commit messages - here are some basic tips:

  • follow Conventional Commits style
  • correct format of commit message should be: <type/action>(<scope/component>): <summary>, for example fix(esp32): Fixed startup timeout issue
  • allowed types are: change,ci,docs,feat,fix,refactor,remove,revert,test
  • sufficiently descriptive message summary should be between 10 to 72 characters and start with upper case letter
  • avoid Jira references in commit messages (unavailable/irrelevant for our customers)

TIP: Install pre-commit hooks and run this check when committing (uses the Conventional Precommit Linter).

👋 Hello P-R-O-C-H-Y, we appreciate your contribution to this project!


📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project.

Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 990eb7b

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

Memory usage test (comparing PR against master branch)

The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32C50⚠️ +3480.00⚠️ +0.050⚠️ +160.00⚠️ +0.05
ESP32S30⚠️ +2240.00⚠️ +0.04000.000.00
ESP32S20⚠️ +2240.00⚠️ +0.04000.000.00
ESP32C3000.000.00000.000.00
ESP32C60⚠️ +3420.00⚠️ +0.060⚠️ +160.00⚠️ +0.05
ESP32H20⚠️ +3420.00⚠️ +0.060⚠️ +160.00⚠️ +0.05
ESP320⚠️ +2240.00⚠️ +0.04000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32C5ESP32S3ESP32S2ESP32C3ESP32C6ESP32H2ESP32
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
libraries/Zigbee/examples/Zigbee_Analog_Input_Output00⚠️ +2240⚠️ +2240000000⚠️ +2240
libraries/Zigbee/examples/Zigbee_Binary_Input_Output00------0000--
libraries/Zigbee/examples/Zigbee_CarbonDioxide_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_Color_Dimmable_Light⚠️ +348⚠️ +16------⚠️ +342⚠️ +16⚠️ +342⚠️ +16--
libraries/Zigbee/examples/Zigbee_Color_Dimmer_Switch00⚠️ +2240⚠️ +2240000000⚠️ +2240
libraries/Zigbee/examples/Zigbee_Contact_Switch00------0000--
libraries/Zigbee/examples/Zigbee_Dimmable_Light00------0000--
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor00⚠️ +2240⚠️ +2240000000⚠️ +2240
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor_MultiPhase00⚠️ +2240⚠️ +2240000000⚠️ +2240
libraries/Zigbee/examples/Zigbee_Electrical_DC_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_Fan_Control00⚠️ +2240⚠️ +2240000000⚠️ +2240
libraries/Zigbee/examples/Zigbee_Gateway00⚠️ +2240⚠️ +224000----⚠️ +2240
libraries/Zigbee/examples/Zigbee_Illuminance_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_Multistate_Input_Output00⚠️ +2240⚠️ +2240000000⚠️ +2240
libraries/Zigbee/examples/Zigbee_OTA_Client00------0000--
libraries/Zigbee/examples/Zigbee_Occupancy_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_On_Off_Light00------0000--
libraries/Zigbee/examples/Zigbee_On_Off_MultiSwitch00⚠️ +2240⚠️ +2240000000⚠️ +2240
libraries/Zigbee/examples/Zigbee_On_Off_Switch00⚠️ +2240⚠️ +2240000000⚠️ +2240
libraries/Zigbee/examples/Zigbee_PM25_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_Power_Outlet00⚠️ +2240⚠️ +2240000000⚠️ +2240
libraries/Zigbee/examples/Zigbee_Pressure_Flow_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_Range_Extender00⚠️ +2240⚠️ +2240000000⚠️ +2240
libraries/Zigbee/examples/Zigbee_Scan_Networks00------0000--
libraries/Zigbee/examples/Zigbee_Temp_Hum_Sensor_Sleepy00------0000--
libraries/Zigbee/examples/Zigbee_Temperature_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_Thermostat00⚠️ +2240⚠️ +2240000000⚠️ +2240
libraries/Zigbee/examples/Zigbee_Vibration_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_Wind_Speed_Sensor00------0000--

@P-R-O-C-H-Y P-R-O-C-H-Y requested a review from Copilot December 2, 2025 13:29
Copilot finished reviewing on behalf of P-R-O-C-H-Y December 2, 2025 13:31
Copilot finished reviewing on behalf of P-R-O-C-H-Y December 2, 2025 13:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

Test Results

 76 files   76 suites   16m 31s ⏱️
 38 tests  38 ✅ 0 💤 0 ❌
241 runs  241 ✅ 0 💤 0 ❌

Results for commit 990eb7b.

♻️ This comment has been updated with latest results.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@P-R-O-C-H-Y P-R-O-C-H-Y moved this from Todo to In Review in Arduino ESP32 Core Project Roadmap Dec 3, 2025
Copilot finished reviewing on behalf of P-R-O-C-H-Y December 3, 2025 13:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Zigbee Issues and Feature Request about Zigbee Status: Review needed Issue or PR is awaiting review

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

Zigbee ColorTemperature Mode

4 participants