Skip to content

Commit bfb6d9b

Browse files
committed
Fix DegradationDirection Get
1 parent 0a0f0e6 commit bfb6d9b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

examples/chef/common/clusters/resource-monitoring/chef-resource-monitoring-delegates.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,12 @@ ChefResourceMonitorInstance::ExternalAttributeRead(const EmberAfAttributeMetadat
247247
bufWriter.Put32(lastChangedTime.IsNull() ? 0 : lastChangedTime.Value());
248248
}
249249
break;
250-
case HepaFilterMonitoring::Attributes::DegradationDirection::Id:
250+
case HepaFilterMonitoring::Attributes::DegradationDirection::Id: {
251+
ResourceMonitoring::DegradationDirectionEnum degradationDirection = GetDegradationDirection();
252+
// The underlying type of ResourceMonitoring::DegradationDirectionEnum is uint8_t
253+
*buffer = to_underlying(degradationDirection);
254+
}
255+
break;
251256
default:
252257
ChipLogError(Zcl, "Unsupported External Attribute Read: %d", static_cast<int>(attributeId));
253258
ret = Protocols::InteractionModel::Status::UnsupportedRead;

0 commit comments

Comments
 (0)