Skip to content

feat(zigbee): Add level step command support for ColorDimmableSwitch#12313

Open
P-R-O-C-H-Y wants to merge 1 commit intomasterfrom
feat/zigbee-level-step
Open

feat(zigbee): Add level step command support for ColorDimmableSwitch#12313
P-R-O-C-H-Y wants to merge 1 commit intomasterfrom
feat/zigbee-level-step

Conversation

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

@P-R-O-C-H-Y P-R-O-C-H-Y commented Feb 4, 2026

Description of Change

This pull request adds support for stepwise adjustment of light brightness levels to the Zigbee Color Dimmer Switch. It introduces the setLightLevelStep command, allowing users to increase or decrease the brightness by a specified step size and duration, both via code and serial commands. The documentation, example usage, and keyword highlighting are updated to reflect these changes.

New Level Step Functionality

  • Added the setLightLevelStep method to the ZigbeeColorDimmerSwitch class, supporting stepwise brightness changes with various addressing modes (group, endpoint, short address, IEEE address). [1] [2]
  • Defined the ZigbeeLevelStepDirection enum (ZIGBEE_LEVEL_STEP_UP, ZIGBEE_LEVEL_STEP_DOWN) for specifying step direction. [1] [2]

Documentation and Example Updates

  • Updated the documentation (ep_color_dimmer_switch.rst) to describe the new setLightLevelStep command, its parameters, and usage examples.
  • Enhanced the example sketch (Zigbee_Color_Dimmer_Switch.ino) to handle new serial commands (stepup, stepdown, stepupfast, stepdownfast) for stepwise brightness control, and updated help text. [1] [2]

Test Scenarios

Tested using 2 ESPs (C6+C5) loaded with ColorDimmableSwitch.ino and ColorDimmableLight.ino

Related links

Closes #11664

@P-R-O-C-H-Y P-R-O-C-H-Y self-assigned this Feb 4, 2026
@P-R-O-C-H-Y P-R-O-C-H-Y added Type: Feature request Feature request for Arduino ESP32 Status: Review needed Issue or PR is awaiting review Area: Zigbee Issues and Feature Request about Zigbee labels Feb 4, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Messages
📖 🎉 Good Job! All checks are passing!

👋 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.
- 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 cf542bf

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Test Results

 90 files   90 suites   33m 33s ⏱️
 67 tests  67 ✅ 0 💤 0 ❌
683 runs  683 ✅ 0 💤 0 ❌

Results for commit cf542bf.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

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
ESP320⚠️ +10120.00⚠️ +0.15000.000.00
ESP32C30⚠️ +10360.00⚠️ +0.15000.000.00
ESP32C50⚠️ +10300.00⚠️ +0.13000.000.00
ESP32C60⚠️ +10360.00⚠️ +0.14000.000.00
ESP32H20⚠️ +10340.00⚠️ +0.15000.000.00
ESP32S20⚠️ +9680.00⚠️ +0.16000.000.00
ESP32S30⚠️ +10040.00⚠️ +0.15000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32ESP32C3ESP32C5ESP32C6ESP32H2ESP32S2ESP32S3
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
libraries/Zigbee/examples/Zigbee_Analog_Input_Output⚠️ +112000000000⚠️ +1120⚠️ +1120
libraries/Zigbee/examples/Zigbee_Color_Dimmer_Switch⚠️ +10120⚠️ +10360⚠️ +10300⚠️ +10360⚠️ +10340⚠️ +9680⚠️ +10040
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor⚠️ +112000000000⚠️ +1120⚠️ +1120
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor_MultiPhase⚠️ +112000000000⚠️ +1120⚠️ +1120
libraries/Zigbee/examples/Zigbee_Fan_Control⚠️ +112000000000⚠️ +1120⚠️ +1120
libraries/Zigbee/examples/Zigbee_Gateway⚠️ +11200000----⚠️ +1120⚠️ +1120
libraries/Zigbee/examples/Zigbee_Multistate_Input_Output⚠️ +112000000000⚠️ +1120⚠️ +1120
libraries/Zigbee/examples/Zigbee_On_Off_MultiSwitch⚠️ +112000000000⚠️ +1120⚠️ +1120
libraries/Zigbee/examples/Zigbee_On_Off_Switch⚠️ +112000000000⚠️ +1120⚠️ +1120
libraries/Zigbee/examples/Zigbee_Power_Outlet⚠️ +112000000000⚠️ +1120⚠️ +1120
libraries/Zigbee/examples/Zigbee_Range_Extender⚠️ +112000000000⚠️ +1120⚠️ +1120
libraries/Zigbee/examples/Zigbee_Thermostat⚠️ +112000000000⚠️ +1120⚠️ +1120
libraries/Zigbee/examples/Zigbee_Binary_Input_Output----000000----
libraries/Zigbee/examples/Zigbee_CarbonDioxide_Sensor----000000----
libraries/Zigbee/examples/Zigbee_Color_Dimmable_Light----000000----
libraries/Zigbee/examples/Zigbee_Contact_Switch----000000----
libraries/Zigbee/examples/Zigbee_Dimmable_Light----000000----
libraries/Zigbee/examples/Zigbee_Electrical_DC_Sensor----000000----
libraries/Zigbee/examples/Zigbee_Illuminance_Sensor----000000----
libraries/Zigbee/examples/Zigbee_OTA_Client----000000----
libraries/Zigbee/examples/Zigbee_Occupancy_Sensor----000000----
libraries/Zigbee/examples/Zigbee_On_Off_Light----000000----
libraries/Zigbee/examples/Zigbee_PM25_Sensor----000000----
libraries/Zigbee/examples/Zigbee_Pressure_Flow_Sensor----000000----
libraries/Zigbee/examples/Zigbee_Scan_Networks----000000----
libraries/Zigbee/examples/Zigbee_Temp_Hum_Sensor_Sleepy----000000----
libraries/Zigbee/examples/Zigbee_Temperature_Sensor----000000----
libraries/Zigbee/examples/Zigbee_Vibration_Sensor----000000----
libraries/Zigbee/examples/Zigbee_Wind_Speed_Sensor----000000----

Copy link
Member

@pedrominatel pedrominatel left a comment

Choose a reason for hiding this comment

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

Just one minor comment. Otherwise LGTM.


**Transition time (ZCL Step command):**

* The transition time is the duration, in **tenths of a second**, that the device should take to perform the step. A step is a change in CurrentLevel of ``step_size`` units.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe mentioning that each step has 100ms will make it clear.

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 Type: Feature request Feature request for Arduino ESP32

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zigbee_Color_Dimmer_Swítch relative brightness change

2 participants