From 638eb935cbd052943c152a2e8b19ed006c45deea Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> Date: Fri, 27 Oct 2023 14:52:23 -0400 Subject: [PATCH] Added reporting attribute change callback in the group server where actions are modifying the group table (#30055) --- src/app/clusters/groups-server/groups-server.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/clusters/groups-server/groups-server.cpp b/src/app/clusters/groups-server/groups-server.cpp index 7318523c118fbe..10aa34351230b7 100644 --- a/src/app/clusters/groups-server/groups-server.cpp +++ b/src/app/clusters/groups-server/groups-server.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -90,6 +91,8 @@ static Status GroupAdd(FabricIndex fabricIndex, EndpointId endpointId, GroupId g } if (CHIP_NO_ERROR == err) { + MatterReportingAttributeChangeCallback(kRootEndpointId, GroupKeyManagement::Id, + GroupKeyManagement::Attributes::GroupTable::Id); return Status::Success; } @@ -109,6 +112,8 @@ static EmberAfStatus GroupRemove(FabricIndex fabricIndex, EndpointId endpointId, CHIP_ERROR err = provider->RemoveEndpoint(fabricIndex, groupId, endpointId); if (CHIP_NO_ERROR == err) { + MatterReportingAttributeChangeCallback(kRootEndpointId, GroupKeyManagement::Id, + GroupKeyManagement::Attributes::GroupTable::Id); return EMBER_ZCL_STATUS_SUCCESS; } @@ -322,7 +327,7 @@ bool emberAfGroupsClusterRemoveAllGroupsCallback(app::CommandHandler * commandOb provider->RemoveEndpoint(fabricIndex, commandPath.mEndpointId); status = Status::Success; - + MatterReportingAttributeChangeCallback(kRootEndpointId, GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id); exit: commandObj->AddStatus(commandPath, status); if (Status::Success != status)