File tree 1 file changed +12
-2
lines changed
src/darwin/Framework/CHIP/ServerEndpoint
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -72,14 +72,19 @@ - (nullable instancetype)initWithAttributeID:(NSNumber *)attributeID value:(NSDi
72
72
_parentCluster = app::ConcreteClusterPath (kInvalidEndpointId , kInvalidClusterId );
73
73
74
74
// Now call setValue to store the value and its serialization.
75
- if ([self setValue : value] == NO ) {
75
+ if ([self setValueInternal : value logIfNotAssociated: NO ] == NO ) {
76
76
return nil ;
77
77
}
78
78
79
79
return self;
80
80
}
81
81
82
82
- (BOOL )setValue : (NSDictionary <NSString *, id> *)value
83
+ {
84
+ return [self setValueInternal: value logIfNotAssociated: YES ];
85
+ }
86
+
87
+ - (BOOL )setValueInternal : (NSDictionary <NSString *, id> *)value logIfNotAssociated : (BOOL )logIfNotAssociated
83
88
{
84
89
id serializedValue;
85
90
id dataType = value[MTRTypeKey];
@@ -121,7 +126,12 @@ - (BOOL)setValue:(NSDictionary<NSString *, id> *)value
121
126
122
127
MTRDeviceController * deviceController = _deviceController;
123
128
if (deviceController == nil ) {
124
- // We're not bound to a controller, so safe to directly update _serializedValue.
129
+ // We're not bound to a controller, so safe to directly update
130
+ // _serializedValue.
131
+ if (logIfNotAssociated) {
132
+ MTR_LOG_DEFAULT (" Not publishing value for attribute " ChipLogFormatMEI " ; not bound to a controller" ,
133
+ ChipLogValueMEI (static_cast <AttributeId>(_attributeID.unsignedLongLongValue )));
134
+ }
125
135
_serializedValue = serializedValue;
126
136
} else {
127
137
[deviceController asyncDispatchToMatterQueue: ^{
You can’t perform that action at this time.
0 commit comments