Skip to content

feat(zigbee): Allow setting mode after Zigbee has started#12308

Draft
P-R-O-C-H-Y wants to merge 1 commit into
masterfrom
feat/window-covering-set-mode
Draft

feat(zigbee): Allow setting mode after Zigbee has started#12308
P-R-O-C-H-Y wants to merge 1 commit into
masterfrom
feat/window-covering-set-mode

Conversation

@P-R-O-C-H-Y

Copy link
Copy Markdown
Member

Description of Change

This pull request updates the setMode method in ZigbeeWindowCovering to improve how the window covering mode attribute is set, handling both cases when Zigbee is started and when it is not.

Improvements to attribute setting logic:

  • Updated setMode in ZigbeeWindowCovering.cpp to use esp_zb_zcl_set_attribute_val with proper locking when Zigbee is started, and to fall back to updating the attribute directly when Zigbee is not started, including enhanced error handling and logging in both cases.

Test Scenarios

Please describe on what Hardware and Software combinations you have tested this Pull Request and how.

(eg. I have tested my Pull Request on Arduino-esp32 core v2.0.2 with ESP32 and ESP32-S2 Board with this scenario)

Related links

@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown
Contributor
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 504914e

@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

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
ESP32000.000.00000.000.00
ESP32C3000.000.00000.000.00
ESP32C50⚠️ +640.00⚠️ +0.01000.000.00
ESP32C60⚠️ +660.00⚠️ +0.01000.000.00
ESP32H20⚠️ +660.00⚠️ +0.01000.000.00
ESP32S2000.000.00000.000.00
ESP32S3000.000.00000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32ESP32C3ESP32C5ESP32C6ESP32H2ESP32S2ESP32S3
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
libraries/Zigbee/examples/Zigbee_Analog_Input_Output00000000000000
libraries/Zigbee/examples/Zigbee_Color_Dimmer_Switch00000000000000
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor00000000000000
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor_MultiPhase00000000000000
libraries/Zigbee/examples/Zigbee_Fan_Control00000000000000
libraries/Zigbee/examples/Zigbee_Gateway000000----0000
libraries/Zigbee/examples/Zigbee_Multistate_Input_Output00000000000000
libraries/Zigbee/examples/Zigbee_On_Off_MultiSwitch00000000000000
libraries/Zigbee/examples/Zigbee_On_Off_Switch00000000000000
libraries/Zigbee/examples/Zigbee_Power_Outlet00000000000000
libraries/Zigbee/examples/Zigbee_Range_Extender00000000000000
libraries/Zigbee/examples/Zigbee_Thermostat00000000000000
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----
libraries/Zigbee/examples/Zigbee_Window_Covering----⚠️ +640⚠️ +660⚠️ +660----

@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

Test Results

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

Results for commit 504914e.

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.

1 participant