Skip to content

Commit 4114150

Browse files
mkardous-silabspull[bot]
authored andcommitted
remove emberCurremtCommnad (#13818)
1 parent 09a0fb5 commit 4114150

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,9 @@ bool OnOffServer::offWithEffectCommand(app::CommandHandler * commandObj, const a
296296
{
297297
#ifdef EMBER_AF_PLUGIN_SCENES
298298
GroupId groupId = ZCL_SCENES_GLOBAL_SCENE_GROUP_ID;
299-
if (emberAfCurrentCommand()->type == EMBER_INCOMING_MULTICAST)
299+
if (commandObj->GetExchangeContext()->IsGroupExchangeContext())
300300
{
301-
groupId = emberAfCurrentCommand()->source->GetSessionHandle()->AsGroupSession()->GetGroupId();
301+
groupId = commandObj->GetExchangeContext()->GetSessionHandle()->AsGroupSession()->GetGroupId();
302302
}
303303

304304
emberAfScenesClusterStoreCurrentSceneCallback(fabric, endpoint, groupId, ZCL_SCENES_GLOBAL_SCENE_SCENE_ID);
@@ -351,9 +351,9 @@ bool OnOffServer::OnWithRecallGlobalSceneCommand(app::CommandHandler * commandOb
351351

352352
#ifdef EMBER_AF_PLUGIN_SCENES
353353
GroupId groupId = ZCL_SCENES_GLOBAL_SCENE_GROUP_ID;
354-
if (emberAfCurrentCommand()->type == EMBER_INCOMING_MULTICAST)
354+
if (commandObj->GetExchangeContext()->IsGroupExchangeContext())
355355
{
356-
groupId = emberAfCurrentCommand()->source->GetSessionHandle()->AsGroupSession()->GetGroupId();
356+
groupId = commandObj->GetExchangeContext()->GetSessionHandle()->AsGroupSession()->GetGroupId();
357357
}
358358

359359
emberAfScenesClusterRecallSavedSceneCallback(fabric, endpoint, groupId, ZCL_SCENES_GLOBAL_SCENE_SCENE_ID);

0 commit comments

Comments
 (0)