Skip to content

Commit

Permalink
Fix Cirque test due to lvl ctrl changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartinez-silabs committed Jan 14, 2022
1 parent 4c4a0ad commit 33b3233
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/controller/python/test/test_scripts/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,29 +176,29 @@ def TestLevelControlCluster(self, nodeid: int, endpoint: int, group: int):
self.logger.info(
f"Sending MoveToLevel command to device {nodeid} endpoint {endpoint}")
try:
commonArgs = dict(transitionTime=0, optionMask=0, optionOverride=0)
commonArgs = dict(transitionTime=0, optionMask=1, optionOverride=1)

# Move to 0
# Move to 1
self.devCtrl.ZCLSend("LevelControl", "MoveToLevel", nodeid,
endpoint, group, dict(**commonArgs, level=0), blocking=True)
endpoint, group, dict(**commonArgs, level=1), blocking=True)
res = self.devCtrl.ZCLReadAttribute(cluster="LevelControl",
attribute="CurrentLevel",
nodeid=nodeid,
endpoint=endpoint,
groupid=group)
TestResult("Read attribute LevelControl.CurrentLevel",
res).assertValueEqual(0)
res).assertValueEqual(1)

# Move to 255
# Move to 254
self.devCtrl.ZCLSend("LevelControl", "MoveToLevel", nodeid,
endpoint, group, dict(**commonArgs, level=255), blocking=True)
endpoint, group, dict(**commonArgs, level=254), blocking=True)
res = self.devCtrl.ZCLReadAttribute(cluster="LevelControl",
attribute="CurrentLevel",
nodeid=nodeid,
endpoint=endpoint,
groupid=group)
TestResult("Read attribute LevelControl.CurrentLevel",
res).assertValueEqual(255)
res).assertValueEqual(254)

return True
except Exception as ex:
Expand Down

0 comments on commit 33b3233

Please sign in to comment.