- Notifications
You must be signed in to change notification settings - Fork7.7k
feat(zigbee): Add AC DC ElectricalMeasurement support#11384
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
feat(zigbee): Add AC DC ElectricalMeasurement support#11384
Uh oh!
There was an error while loading.Please reload this page.
Conversation
github-actionsbot commentedMay 21, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
👋Hello P-R-O-C-H-Y, we appreciate your contribution to this project! 📘 Please review the project'sContributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you haveread and signed theContributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
github-actionsbot commentedMay 21, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Test Results 76 files 76 suites 12m 42s ⏱️ Results for commit565150b. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR adds support for Electrical Measurement (both DC and AC, single- and multi-phase) in the Zigbee library, along with example sketches, configuration files, and documentation updates.
- Introduces
ZigbeeElectricalMeasurement
endpoint class with DC and AC measurement APIs - Registers the new endpoint in core headers/CMakeLists and provides three fully documented examples (DC, AC single-phase, AC multi-phase)
- Supplies CI configs and README updates for each example
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
libraries/Zigbee/src/ep/ZigbeeElectricalMeasurement.h | Defines new endpoint class and measurement enums/APIs |
libraries/Zigbee/src/Zigbee.h | Includes new ElectricalMeasurement endpoint header |
CMakeLists.txt | Adds implementation source to build |
libraries/Zigbee/examples/Zigbee_Electrical_DC_Sensor/* | DC example sketch, CI config, and README |
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor/* | AC single-phase example sketch, CI config, and README |
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor_MultiPhase/* | AC multi-phase example sketch, CI config, and README |
Comments suppressed due to low confidence (2)
libraries/Zigbee/src/ep/ZigbeeElectricalMeasurement.h:1
- Update the class-level comment to reference ElectricalMeasurement rather than Pressure sensor to accurately describe the new endpoint.
/* Class of Zigbee Pressure sensor endpoint inherited from common EP class */
libraries/Zigbee/src/ep/ZigbeeElectricalMeasurement.h:98
- [nitpick] The field name
measure_type
is ambiguous; consider renaming tomeasurement_types_bitmask
ormeasured_types
for clarity.
uint32_t measure_type = 0x0000;
Uh oh!
There was an error while loading.Please reload this page.
...e/examples/Zigbee_Electrical_AC_Sensor_MultiPhase/Zigbee_Electrical_AC_Sensor_MultiPhase.ino OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor/Zigbee_Electrical_AC_Sensor.inoShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM
dba16c3
tob50d3fb
Compare7bafc1b
intoespressif:masterUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Description of Change
This pull request introduces a new Zigbee Electrical measurement endpoint support, containing support for both DC and AC(single or multi phase).
Added 3 new examples showing how the Electrical Measurement can be configured and used.
Tests scenarios
Tested using the new examples flashed on ESP32-C6 and connecting to a coordinator running on HomeAssistant ZHA.
NOTE: DC measurement is currently not supported by HA ZHA - pending PR here:zigpy/zha#453
Screenshot of AC multiphase example in HA

Related links
Closes#11277