File tree 1 file changed +4
-2
lines changed
src/darwin/Framework/CHIP
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2534,8 +2534,6 @@ - (NSArray *)_getAttributesToReportWithReportedValues:(NSArray<NSDictionary<NSSt
2534
2534
NSNumber * dataVersion = attributeDataValue[MTRDataVersionKey];
2535
2535
MTRClusterPath * clusterPath = [MTRClusterPath clusterPathWithEndpointID: attributePath.endpoint clusterID: attributePath.cluster];
2536
2536
if (dataVersion) {
2537
- [self _noteDataVersion: dataVersion forClusterPath: clusterPath];
2538
-
2539
2537
// Remove data version from what we cache in memory
2540
2538
attributeDataValue = [self _dataValueWithoutDataVersion: attributeDataValue];
2541
2539
}
@@ -2544,6 +2542,10 @@ - (NSArray *)_getAttributesToReportWithReportedValues:(NSArray<NSDictionary<NSSt
2544
2542
BOOL readCacheValueChanged = ![self _attributeDataValue: attributeDataValue isEqualToDataValue: previousValue];
2545
2543
// Now that we have grabbed previousValue, update our cache with the attribute value.
2546
2544
if (readCacheValueChanged) {
2545
+ if (dataVersion) {
2546
+ [self _noteDataVersion: dataVersion forClusterPath: clusterPath];
2547
+ }
2548
+
2547
2549
[self _setCachedAttributeValue: attributeDataValue forPath: attributePath];
2548
2550
if (!_deviceConfigurationChanged) {
2549
2551
_deviceConfigurationChanged = [self _attributeAffectsDeviceConfiguration: attributePath];
You can’t perform that action at this time.
0 commit comments