Include dynamic handling of the ThermostatOperatingState capability #1967
+140
−36
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
This has been a TODO for a long time.
This change performs a read of the Thermostat AttributeList in added and checks whether the ThermostatRunningState attribute is included. Whether it is or isn't, the device is profiled accordingly.
Further, the powerSource attribute list read system was refactored a bit to play more nicely with this change, as well as any future changes. Both reads were moved to device_added with a cluster/feature gate, and a gating helper function was added to match_profile to ensure all reads have returned the necessary profiling information before profiling is completed.
Summary of Completed Tests
Unit tests updated to handle these changes. Some include a positive read and others a negative read to get a variety of test coverage.
Tested successfully on a physical device needing both a PowerSource and Thermostat AtrributeList read.