Matter Electrical Sensor: Support Power Topology Cluster #2444
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
Multi-switch plugs that support Electrical Sensor on multiple endpoints are not currently handled correctly in the driver, as the electrical handling is silently dropped when creating a profile for all child devices. This PR aims to fix that by adding handling of the PowerTopology cluster, a required cluster for the Electrical Sensor device type.
This cluster primarily indicates how Electrical Sensors are organized on the device through its feature map, and this PR handles 2 of the permutations, namely SET and NODE. For now, all other permutations (primarily TREE) will be silently dropped if it is supported, though we know of no real devices using this topology.
In the spec, a NODE topology indicates that there is only one source of electrical readings for the entire device, the "node". A SET topology indicates that the electrical sensor supports readings for some subset of the devices, and therefore there are likely >1 of these sensors, each with a SET topology and each supporting readings of different endpoints. These endpoints are specified through the AvailableEndpoints attribute, which we read on an initial join.
Summary of Completed Tests