Skip to content

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

Merged
me-no-dev merged 3 commits into
masterfrom
feat/zigbee-level-step
Feb 9, 2026
Merged

feat(zigbee): Add level step command support for ColorDimmableSwitch#12313
me-no-dev merged 3 commits into
masterfrom
feat/zigbee-level-step

Conversation

@P-R-O-C-H-Y
Copy link
Copy Markdown
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
Copy Markdown
Contributor

github-actions Bot commented Feb 4, 2026

Warnings
⚠️

Some issues found for the commit messages in this PR:

  • the commit message "Apply suggestion from @P-R-O-C-H-Y":
    • 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 924ae4e

@github-actions
Copy link
Copy Markdown
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
Copy Markdown
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⚠️ +10760.00⚠️ +0.16000.000.00
ESP32C30⚠️ +10420.00⚠️ +0.15000.000.00
ESP32C50⚠️ +10360.00⚠️ +0.13000.000.00
ESP32C60⚠️ +10420.00⚠️ +0.15000.000.00
ESP32H20⚠️ +10400.00⚠️ +0.15000.000.00
ESP32S20⚠️ +10240.00⚠️ +0.17000.000.00
ESP32S30⚠️ +10720.00⚠️ +0.16000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32ESP32C3ESP32C5ESP32C6ESP32H2ESP32S2ESP32S3
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
libraries/Zigbee/examples/Zigbee_Analog_Input_Output⚠️ +1760⚠️ +60⚠️ +60⚠️ +60⚠️ +60⚠️ +1680⚠️ +1760
libraries/Zigbee/examples/Zigbee_Color_Dimmer_Switch⚠️ +10760⚠️ +10420⚠️ +10360⚠️ +10420⚠️ +10400⚠️ +10240⚠️ +10720
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor⚠️ +1760⚠️ +60⚠️ +60⚠️ +60⚠️ +60⚠️ +1680⚠️ +1760
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor_MultiPhase⚠️ +1760⚠️ +60⚠️ +60⚠️ +60⚠️ +60⚠️ +1680⚠️ +1800
libraries/Zigbee/examples/Zigbee_Fan_Control⚠️ +1760⚠️ +60⚠️ +60⚠️ +60⚠️ +60⚠️ +1680⚠️ +1760
libraries/Zigbee/examples/Zigbee_Gateway⚠️ +1680⚠️ +60⚠️ +60----⚠️ +1680⚠️ +1680
libraries/Zigbee/examples/Zigbee_Multistate_Input_Output⚠️ +1760⚠️ +60⚠️ +60⚠️ +60⚠️ +60⚠️ +1680⚠️ +1760
libraries/Zigbee/examples/Zigbee_On_Off_MultiSwitch⚠️ +1760⚠️ +60⚠️ +60⚠️ +60⚠️ +60⚠️ +1680⚠️ +1760
libraries/Zigbee/examples/Zigbee_On_Off_Switch⚠️ +1760⚠️ +60⚠️ +60⚠️ +60⚠️ +60⚠️ +1680⚠️ +1760
libraries/Zigbee/examples/Zigbee_Power_Outlet⚠️ +1760⚠️ +60⚠️ +60⚠️ +60⚠️ +60⚠️ +1680⚠️ +1760
libraries/Zigbee/examples/Zigbee_Range_Extender⚠️ +1760⚠️ +60⚠️ +60⚠️ +60⚠️ +60⚠️ +1680⚠️ +1760
libraries/Zigbee/examples/Zigbee_Thermostat⚠️ +1760⚠️ +60⚠️ +60⚠️ +60⚠️ +60⚠️ +1680⚠️ +1760
libraries/Zigbee/examples/Zigbee_Binary_Input_Output----⚠️ +60⚠️ +60⚠️ +60----
libraries/Zigbee/examples/Zigbee_CarbonDioxide_Sensor----⚠️ +60⚠️ +60⚠️ +60----
libraries/Zigbee/examples/Zigbee_Color_Dimmable_Light----⚠️ +60⚠️ +60⚠️ +60----
libraries/Zigbee/examples/Zigbee_Contact_Switch----⚠️ +60⚠️ +60⚠️ +60----
libraries/Zigbee/examples/Zigbee_Dimmable_Light----⚠️ +60⚠️ +60⚠️ +60----
libraries/Zigbee/examples/Zigbee_Electrical_DC_Sensor----⚠️ +60⚠️ +60⚠️ +60----
libraries/Zigbee/examples/Zigbee_Illuminance_Sensor----⚠️ +60⚠️ +60⚠️ +60----
libraries/Zigbee/examples/Zigbee_OTA_Client----⚠️ +60⚠️ +60⚠️ +60----
libraries/Zigbee/examples/Zigbee_Occupancy_Sensor----⚠️ +60⚠️ +60⚠️ +60----
libraries/Zigbee/examples/Zigbee_On_Off_Light----⚠️ +60⚠️ +60⚠️ +60----
libraries/Zigbee/examples/Zigbee_PM25_Sensor----⚠️ +60⚠️ +60⚠️ +60----
libraries/Zigbee/examples/Zigbee_Pressure_Flow_Sensor----⚠️ +60⚠️ +60⚠️ +60----
libraries/Zigbee/examples/Zigbee_Scan_Networks----⚠️ +60⚠️ +60⚠️ +60----
libraries/Zigbee/examples/Zigbee_Temp_Hum_Sensor_Sleepy----⚠️ +60⚠️ +60⚠️ +60----
libraries/Zigbee/examples/Zigbee_Temperature_Sensor----⚠️ +60⚠️ +60⚠️ +60----
libraries/Zigbee/examples/Zigbee_Vibration_Sensor----⚠️ +60⚠️ +60⚠️ +60----
libraries/Zigbee/examples/Zigbee_Wind_Speed_Sensor----⚠️ +60⚠️ +60⚠️ +60----

Copy link
Copy Markdown
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.

Comment thread docs/en/zigbee/ep_color_dimmer_switch.rst Outdated
Comment thread docs/en/zigbee/ep_color_dimmer_switch.rst Outdated
@me-no-dev me-no-dev added Status: Pending Merge Pull Request is ready to be merged and removed Status: Review needed Issue or PR is awaiting review labels Feb 9, 2026
@me-no-dev me-no-dev merged commit f9ec698 into master Feb 9, 2026
72 checks passed
@me-no-dev me-no-dev deleted the feat/zigbee-level-step branch February 9, 2026 12:24
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: Pending Merge Pull Request is ready to be merged 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

3 participants