feat(zigbee): Add Fan Control endpoint support#11559
Conversation
👋 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 ...
Review and merge process you can expect ...
|
Test Results 76 files 76 suites 16m 23s ⏱️ Results for commit f76554f. ♻️ This comment has been updated with latest results. |
baaff35 to
46e9353
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for a Zigbee fan control endpoint, registers its keywords, and provides an example sketch.
- Introduce
ZigbeeFanControlclass (header and implementation) to manage fan modes and sequences. - Update core Zigbee registry (
Zigbee.h,CMakeLists.txt,keywords.txt) to include the new endpoint. - Provide a complete example (CI config, sketch, and README) demonstrating fan control usage.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| libraries/Zigbee/src/ep/ZigbeeFanControl.h | Define fan control endpoint interface |
| libraries/Zigbee/src/ep/ZigbeeFanControl.cpp | Implement fan control logic and callbacks |
| libraries/Zigbee/src/Zigbee.h | Include new fan control endpoint |
| libraries/Zigbee/keywords.txt | Register ZigbeeFanControl and related enums |
| CMakeLists.txt | Add ZigbeeFanControl.cpp to build list |
| libraries/Zigbee/examples/Zigbee_Fan_Control/ci.json | CI config for fan control example |
| libraries/Zigbee/examples/Zigbee_Fan_Control/Zigbee_Fan_Control.ino | Example sketch for fan control |
| libraries/Zigbee/examples/Zigbee_Fan_Control/README.md | Documentation for the fan control example |
Comments suppressed due to low confidence (2)
libraries/Zigbee/src/ep/ZigbeeFanControl.h:1
- The class comment references a Pressure sensor but this file implements Fan Control. Please update the comment to describe the Fan Control endpoint.
/* Class of Zigbee Pressure sensor endpoint inherited from common EP class */
libraries/Zigbee/examples/Zigbee_Fan_Control/README.md:32
- The fan mode list in the README omits
AUTOandSMART. Please document the colors or behavior for those modes.
- ON: White
| #if CONFIG_ZB_ENABLED | ||
|
|
||
| ZigbeeFanControl::ZigbeeFanControl(uint8_t endpoint) : ZigbeeEP(endpoint) { | ||
| _device_id = ESP_ZB_HA_SIMPLE_SENSOR_DEVICE_ID; |
There was a problem hiding this comment.
The device ID is set to SIMPLE_SENSOR but this is a fan control device. Use the appropriate constant (e.g., ESP_ZB_HA_FAN_CONTROL_DEVICE_ID).
| _device_id = ESP_ZB_HA_SIMPLE_SENSOR_DEVICE_ID; | |
| _device_id = ESP_ZB_HA_FAN_CONTROL_DEVICE_ID; |
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.
Click to expand the detailed deltas report [usage change in BYTES]
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||
| #include "Zigbee.h" | ||
|
|
||
| /* Zigbee light bulb configuration */ |
There was a problem hiding this comment.
| /* Zigbee light bulb configuration */ | |
| /* Zigbee fan configuration */ |
Description of Change
This pull request introduces a new Zigbee Fan control endpoint + minor updates to keywords.txt.
Tests scenarios
Tested using HomeAssistant ZHA and ESP32C6 flashed with the new example.
Related links