Skip to content

Commit

Permalink
FanControl: modify percentSetting/percentSpeedSetting return value in…
Browse files Browse the repository at this point in the history
… case NULL is written (match spec) (project-chip#36242)

* Modified return value as per spec

* Modified return value for speedSetting attribute

* Updated test suite with return value.
  • Loading branch information
arun-silabs authored Dec 3, 2024
1 parent 9a1d48c commit 9e85e85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/clusters/fan-control-server/fan-control-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ MatterFanControlClusterServerPreAttributeChangedCallback(const ConcreteAttribute
}
else
{
res = Status::WriteIgnored;
res = Status::InvalidInState;
}
}
else
Expand Down Expand Up @@ -252,7 +252,7 @@ MatterFanControlClusterServerPreAttributeChangedCallback(const ConcreteAttribute
}
else
{
res = Status::WriteIgnored;
res = Status::InvalidInState;
}
}
else
Expand Down
4 changes: 4 additions & 0 deletions src/app/tests/suites/TestFanControl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ tests:
attribute: "PercentSetting"
arguments:
value: null
response:
error: INVALID_IN_STATE

- label: "Read back percent setting"
command: "readAttribute"
Expand Down Expand Up @@ -105,6 +107,8 @@ tests:
attribute: "SpeedSetting"
arguments:
value: null
response:
error: INVALID_IN_STATE

- label: "Read back speed setting"
command: "readAttribute"
Expand Down

0 comments on commit 9e85e85

Please sign in to comment.