Skip to content

Commit 388dda7

Browse files
lpbeliveau-silabspimpalemahesh
authored andcommitted
Removed group selection from oneffectcommand (project-chip#34038)
1 parent ec2ad11 commit 388dda7

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

src/app/clusters/on-off-server/on-off-server.cpp

+3-13
Original file line numberDiff line numberDiff line change
@@ -622,12 +622,7 @@ bool OnOffServer::offWithEffectCommand(app::CommandHandler * commandObj, const a
622622
if (globalSceneControl)
623623
{
624624
#ifdef MATTER_DM_PLUGIN_SCENES_MANAGEMENT
625-
GroupId groupId = ZCL_SCENES_GLOBAL_SCENE_GROUP_ID;
626-
if (commandObj->GetExchangeContext()->IsGroupExchangeContext())
627-
{
628-
groupId = commandObj->GetExchangeContext()->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId();
629-
}
630-
ScenesManagement::ScenesServer::Instance().StoreCurrentScene(fabric, endpoint, groupId,
625+
ScenesManagement::ScenesServer::Instance().StoreCurrentScene(fabric, endpoint, ZCL_SCENES_GLOBAL_SCENE_GROUP_ID,
631626
ZCL_SCENES_GLOBAL_SCENE_SCENE_ID);
632627
#endif // MATTER_DM_PLUGIN_SCENES_MANAGEMENT
633628
OnOff::Attributes::GlobalSceneControl::Set(endpoint, false);
@@ -683,13 +678,8 @@ bool OnOffServer::OnWithRecallGlobalSceneCommand(app::CommandHandler * commandOb
683678
}
684679

685680
#ifdef MATTER_DM_PLUGIN_SCENES_MANAGEMENT
686-
GroupId groupId = ZCL_SCENES_GLOBAL_SCENE_GROUP_ID;
687-
if (commandObj->GetExchangeContext()->IsGroupExchangeContext())
688-
{
689-
groupId = commandObj->GetExchangeContext()->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId();
690-
}
691-
692-
ScenesManagement::ScenesServer::Instance().RecallScene(fabric, endpoint, groupId, ZCL_SCENES_GLOBAL_SCENE_SCENE_ID);
681+
ScenesManagement::ScenesServer::Instance().RecallScene(fabric, endpoint, ZCL_SCENES_GLOBAL_SCENE_GROUP_ID,
682+
ZCL_SCENES_GLOBAL_SCENE_SCENE_ID);
693683
#endif // MATTER_DM_PLUGIN_SCENES_MANAGEMENT
694684

695685
OnOff::Attributes::GlobalSceneControl::Set(endpoint, true);

0 commit comments

Comments
 (0)