Skip to content

Commit

Permalink
Fixed behavior of the RecallScene for the Default scene handler in th…
Browse files Browse the repository at this point in the history
…e level control cluster
  • Loading branch information
lpbeliveau-silabs committed Nov 17, 2023
1 parent ff75a90 commit 1905fdf
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/app/clusters/level-control/level-control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint16_t>(timeMs / 100)),
chip::Optional<BitMask<OptionsBitmap>>(), chip::Optional<BitMask<OptionsBitmap>>(),
INVALID_STORED_LEVEL);

if (status != Status::Success)
{
return CHIP_ERROR_READ_FAILED;
}
moveToLevelHandler(endpoint, command, level, app::DataModel::MakeNullable(static_cast<uint16_t>(timeMs / 100)),
chip::Optional<BitMask<OptionsBitmap>>(), chip::Optional<BitMask<OptionsBitmap>>(),
INVALID_STORED_LEVEL);

return CHIP_NO_ERROR;
}
Expand Down

0 comments on commit 1905fdf

Please sign in to comment.