|
| 1 | +# Copyright (c) 2024 Project CHIP Authors |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +name: |
| 16 | + Test that "passes" if turning on On/Off cluster reports Level Control things |
| 17 | + |
| 18 | +config: |
| 19 | + nodeId: 0x12344321 |
| 20 | + cluster: "On/Off" |
| 21 | + endpoint: 1 |
| 22 | + # We expect our test to time out, so set a timeout that's not too long, but |
| 23 | + # long enough that if the server does report the attribute change we will |
| 24 | + # almost certianly see it. |
| 25 | + timeout: 5 |
| 26 | + |
| 27 | +tests: |
| 28 | + - label: "Wait for the commissioned device to be retrieved" |
| 29 | + cluster: "DelayCommands" |
| 30 | + command: "WaitForCommissionee" |
| 31 | + arguments: |
| 32 | + values: |
| 33 | + - name: "nodeId" |
| 34 | + value: nodeId |
| 35 | + |
| 36 | + - label: "Turn off the light" |
| 37 | + command: "Off" |
| 38 | + |
| 39 | + - label: "Subscribe LevelControl RemainingTime Attribute" |
| 40 | + command: "subscribeAttribute" |
| 41 | + cluster: "LevelControl" |
| 42 | + attribute: "RemainingTime" |
| 43 | + minInterval: 0 |
| 44 | + maxInterval: 5 |
| 45 | + response: |
| 46 | + value: 0 |
| 47 | + |
| 48 | + - label: "Turn on the light to see attribute change, if any" |
| 49 | + command: "On" |
| 50 | + |
| 51 | + - label: "Check for attribute report" |
| 52 | + command: "waitForReport" |
| 53 | + cluster: "LevelControl" |
| 54 | + attribute: "RemainingTime" |
| 55 | + # This test should fail, since there should be no reporting for an |
| 56 | + # attribute that did not actually change. |
| 57 | + response: |
| 58 | + value: 0 |
0 commit comments