Skip to content

Commit

Permalink
Removed group selection from oneffectcommand (#34038)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpbeliveau-silabs authored Jun 21, 2024
1 parent bf7e9fc commit 2af3379
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/app/clusters/on-off-server/on-off-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 2af3379

Please sign in to comment.