@@ -622,12 +622,7 @@ bool OnOffServer::offWithEffectCommand(app::CommandHandler * commandObj, const a
622
622
if (globalSceneControl)
623
623
{
624
624
#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,
631
626
ZCL_SCENES_GLOBAL_SCENE_SCENE_ID);
632
627
#endif // MATTER_DM_PLUGIN_SCENES_MANAGEMENT
633
628
OnOff::Attributes::GlobalSceneControl::Set (endpoint, false );
@@ -683,13 +678,8 @@ bool OnOffServer::OnWithRecallGlobalSceneCommand(app::CommandHandler * commandOb
683
678
}
684
679
685
680
#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);
693
683
#endif // MATTER_DM_PLUGIN_SCENES_MANAGEMENT
694
684
695
685
OnOff::Attributes::GlobalSceneControl::Set (endpoint, true );
0 commit comments