From 1905fdf899f2086b1ea455053aa37ce7e8274af3 Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs Date: Fri, 17 Nov 2023 13:43:15 -0500 Subject: [PATCH] Fixed behavior of the RecallScene for the Default scene handler in the level control cluster --- src/app/clusters/level-control/level-control.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index a2bfc1a58b794e..2630d2a9056a84 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -238,18 +238,13 @@ class DefaultLevelControlSceneHandler : public scenes::DefaultSceneHandlerImpl // TODO : Implement action on frequency when frequency not provisional anymore // if(LevelControlHasFeature(endpoint, LevelControl::Feature::kFrequency)){} - Status status; + CommandId command = LevelControlHasFeature(endpoint, LevelControl::Feature::kOnOff) ? Commands::MoveToLevelWithOnOff::Id : Commands::MoveToLevel::Id; - status = moveToLevelHandler(endpoint, command, level, app::DataModel::MakeNullable(static_cast(timeMs / 100)), - chip::Optional>(), chip::Optional>(), - INVALID_STORED_LEVEL); - - if (status != Status::Success) - { - return CHIP_ERROR_READ_FAILED; - } + moveToLevelHandler(endpoint, command, level, app::DataModel::MakeNullable(static_cast(timeMs / 100)), + chip::Optional>(), chip::Optional>(), + INVALID_STORED_LEVEL); return CHIP_NO_ERROR; }