From 2af3379a26bc6d87397473622a0018630cb681d5 Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> Date: Fri, 21 Jun 2024 08:49:18 -0400 Subject: [PATCH] Removed group selection from oneffectcommand (#34038) --- src/app/clusters/on-off-server/on-off-server.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/app/clusters/on-off-server/on-off-server.cpp b/src/app/clusters/on-off-server/on-off-server.cpp index aadac6c6e2e630..c7e64cd7afc161 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -622,12 +622,7 @@ bool OnOffServer::offWithEffectCommand(app::CommandHandler * commandObj, const a if (globalSceneControl) { #ifdef MATTER_DM_PLUGIN_SCENES_MANAGEMENT - GroupId groupId = ZCL_SCENES_GLOBAL_SCENE_GROUP_ID; - if (commandObj->GetExchangeContext()->IsGroupExchangeContext()) - { - groupId = commandObj->GetExchangeContext()->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId(); - } - ScenesManagement::ScenesServer::Instance().StoreCurrentScene(fabric, endpoint, groupId, + ScenesManagement::ScenesServer::Instance().StoreCurrentScene(fabric, endpoint, ZCL_SCENES_GLOBAL_SCENE_GROUP_ID, ZCL_SCENES_GLOBAL_SCENE_SCENE_ID); #endif // MATTER_DM_PLUGIN_SCENES_MANAGEMENT OnOff::Attributes::GlobalSceneControl::Set(endpoint, false); @@ -683,13 +678,8 @@ bool OnOffServer::OnWithRecallGlobalSceneCommand(app::CommandHandler * commandOb } #ifdef MATTER_DM_PLUGIN_SCENES_MANAGEMENT - GroupId groupId = ZCL_SCENES_GLOBAL_SCENE_GROUP_ID; - if (commandObj->GetExchangeContext()->IsGroupExchangeContext()) - { - groupId = commandObj->GetExchangeContext()->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId(); - } - - ScenesManagement::ScenesServer::Instance().RecallScene(fabric, endpoint, groupId, ZCL_SCENES_GLOBAL_SCENE_SCENE_ID); + ScenesManagement::ScenesServer::Instance().RecallScene(fabric, endpoint, ZCL_SCENES_GLOBAL_SCENE_GROUP_ID, + ZCL_SCENES_GLOBAL_SCENE_SCENE_ID); #endif // MATTER_DM_PLUGIN_SCENES_MANAGEMENT OnOff::Attributes::GlobalSceneControl::Set(endpoint, true);