-
Notifications
You must be signed in to change notification settings - Fork 7.7k
feat(zigbee): Extend switch EPs with get Light methods #11902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 14m 19s ⏱️ Results for commit 1366fbf. ♻️ This comment has been updated with latest results. |
400c8e6
to
76b5a00
Compare
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]
|
Description of Change
This pull request introduces significant improvements to the Zigbee switch and color dimmer switch functionality, focusing on enhanced state polling, attribute readback, and callback handling for light state, level, and color changes. The changes improve how the switch tracks and reports the state of bound lights, and add flexible mechanisms for polling and responding to changes in light attributes.
Enhanced Zigbee Switch State Polling and Reporting:
periodicTask
) inZigbee_On_Off_Switch.ino
to poll the light state every second and print bound devices every 10 seconds, improving real-time tracking of connected lights. [1] [2]onLightStateChange
callback andlight_state
tracking to log state changes and ensure the application responds only to actual changes. [1] [2]Expanded ZigbeeColorDimmerSwitch Attribute Handling and Callbacks:
getLightState
,getLightLevel
, andgetLightColor
methods to support polling light state, level, and color for various addressing modes (group, endpoint, IEEE address), enabling more flexible device management. [1] [2]onLightStateChange
,onLightLevelChange
,onLightColorChange
, etc.) to allow users to register handlers for state, level, and color changes, both with and without source information. [1] [2]zbAttributeRead
, including robust parsing and callback invocation for ON/OFF, level, and color attributes, with proper handling of XY and HS color updates and conversion to RGB.These changes collectively make the Zigbee switch and color dimmer switch more responsive, extensible, and easier to integrate into applications requiring real-time light state monitoring and control.
Test Scenarios
Tested with Updated On/Off switch + Light example and Customized ColorDimmableSwitch + ColorDimmableLight examples.
Related links
Closes #11886