Skip to content

Commit

Permalink
Removed interaction between OnOff and Level control from the test
Browse files Browse the repository at this point in the history
  • Loading branch information
lpbeliveau-silabs committed Jul 23, 2024
1 parent b6c9c94 commit 6f51102
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 70 deletions.
7 changes: 2 additions & 5 deletions src/app/clusters/level-control/level-control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,8 @@ class DefaultLevelControlSceneHandler : public scenes::DefaultSceneHandlerImpl

if (!app::NumericAttributeTraits<uint8_t>::IsNullValue(level))
{
CommandId command = LevelControlHasFeature(endpoint, LevelControl::Feature::kOnOff) ? Commands::MoveToLevelWithOnOff::Id
: Commands::MoveToLevel::Id;

moveToLevelHandler(endpoint, command, level, app::DataModel::MakeNullable(static_cast<uint16_t>(timeMs / 100)),
chip::Optional<BitMask<OptionsBitmap>>(), chip::Optional<BitMask<OptionsBitmap>>(),
moveToLevelHandler(endpoint, Commands::MoveToLevel::Id, level, app::DataModel::MakeNullable(static_cast<uint16_t>(timeMs / 100)),
chip::Optional<BitMask<OptionsBitmap>>(1), chip::Optional<BitMask<OptionsBitmap>>(1),
INVALID_STORED_LEVEL);
}

Expand Down
72 changes: 7 additions & 65 deletions src/app/tests/suites/certification/Test_TC_LVL_9_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,20 @@ tests:
value: []

- label:
"Step 2a: TH sends a MoveToLevelWithOnOff command to DUT, with Level
=0 and TransitionTime =0 (immediate)"
PICS: LVL.S.C04.Rsp
"Step 2a: TH sends a MoveToLevel command to DUT, with Level =0 and
TransitionTime =0 (immediate)"
cluster: "Level Control"
command: "MoveToLevelWithOnOff"
command: "MoveToLevel"
arguments:
values:
- name: "Level"
value: 0
- name: "TransitionTime"
value: 0
- name: "OptionsMask"
value: 0
value: 1
- name: "OptionsOverride"
value: 0
value: 1

- label: "Step 2b: TH reads the MinLevel attribute from the DUT"
cluster: "Level Control"
Expand All @@ -148,41 +147,7 @@ tests:
constraints:
type: int8u

- label: "Step 2c: after a few seconds, TH reads OnOff attribute from DUT"
PICS: LVL.S.C04.Rsp && OO.S.A0000
cluster: "On/Off"
command: "readAttribute"
attribute: "OnOff"
response:
value: 0

- label: "Step 2d: TH reads the CurrentLevel attribute from DUT"
PICS: LVL.S.C04.Rsp && LVL.S.A0000
cluster: "Level Control"
command: "readAttribute"
attribute: "CurrentLevel"
response:
value: MinLevelValue

- label:
"Step 2e: TH sends a MoveToLevel command to DUT, with Level =0 and
TransitionTime =0 (immediate)"
PICS: LVL.S && !LVL.S.C04.Rsp
cluster: "Level Control"
command: "MoveToLevel"
arguments:
values:
- name: "Level"
value: 0
- name: "TransitionTime"
value: 0
- name: "OptionsMask"
value: 0
- name: "OptionsOverride"
value: 0

- label: "Step 2f: TH reads the CurrentLevel attribute from DUT"
PICS: LVL.S.A0000 && !LVL.S.C04.Rsp
- label: "Step 2c: TH reads the CurrentLevel attribute from DUT"
cluster: "Level Control"
command: "readAttribute"
attribute: "CurrentLevel"
Expand Down Expand Up @@ -214,9 +179,6 @@ tests:
AttributeValueList: [{ AttributeID: 0x0000, ValueUnsigned8: 0x64 }]}]'
"
command: "AddScene"
## The default handlers for level control and on/off assume that if both clusters are in the same endpoint,
## the levvel control cluster will use the onoff with level command and thus onoff will be turned on.
PICS: OO.S && LVL.S.C04.Rsp
arguments:
values:
- name: "GroupID"
Expand Down Expand Up @@ -248,7 +210,6 @@ tests:
- label:
"Step 5a: TH sends a RecallScene command to DUT with the GroupID field
set to G1 and the SceneID field set to 0x02."
PICS: S.S.C05.Rsp
command: "RecallScene"
arguments:
values:
Expand All @@ -257,16 +218,7 @@ tests:
- name: "SceneID"
value: 0x02

- label: "Step 5b: after a few seconds, TH reads OnOff attribute from DUT"
PICS: LVL.S.C04.Rsp && LVL.S.A0000
cluster: "On/Off"
command: "readAttribute"
attribute: "OnOff"
response:
value: 1

- label: "Step 5c: TH reads the CurrentLevel attribute from DUT"
PICS: LVL.S.C04.Rsp && LVL.S.A0000
- label: "Step 5b: TH reads the CurrentLevel attribute from DUT"
cluster: "Level Control"
command: "readAttribute"
attribute: "CurrentLevel"
Expand All @@ -276,7 +228,6 @@ tests:
- label:
"Step 6a: TH sends a RecallScene command to DUT with the GroupID field
set to G1 and the SceneID field set to 0x01."
PICS: S.S.C05.Rsp
command: "RecallScene"
arguments:
values:
Expand All @@ -285,16 +236,7 @@ tests:
- name: "SceneID"
value: 0x01

- label: "Step 6b: after a few seconds, TH reads OnOff attribute from DUT"
PICS: LVL.S.C04.Rsp && LVL.S.A0000
cluster: "On/Off"
command: "readAttribute"
attribute: "OnOff"
response:
value: 0

- label: "Step 6c: TH reads the CurrentLevel attribute from DUT"
PICS: LVL.S.C04.Rsp && LVL.S.A0000
cluster: "Level Control"
command: "readAttribute"
attribute: "CurrentLevel"
Expand Down

0 comments on commit 6f51102

Please sign in to comment.