Skip to content

Commit 9e85e85

Browse files
authored
FanControl: modify percentSetting/percentSpeedSetting return value in 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.
1 parent 9a1d48c commit 9e85e85

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/app/clusters/fan-control-server/fan-control-server.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ MatterFanControlClusterServerPreAttributeChangedCallback(const ConcreteAttribute
212212
}
213213
else
214214
{
215-
res = Status::WriteIgnored;
215+
res = Status::InvalidInState;
216216
}
217217
}
218218
else
@@ -252,7 +252,7 @@ MatterFanControlClusterServerPreAttributeChangedCallback(const ConcreteAttribute
252252
}
253253
else
254254
{
255-
res = Status::WriteIgnored;
255+
res = Status::InvalidInState;
256256
}
257257
}
258258
else

src/app/tests/suites/TestFanControl.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ tests:
6969
attribute: "PercentSetting"
7070
arguments:
7171
value: null
72+
response:
73+
error: INVALID_IN_STATE
7274

7375
- label: "Read back percent setting"
7476
command: "readAttribute"
@@ -105,6 +107,8 @@ tests:
105107
attribute: "SpeedSetting"
106108
arguments:
107109
value: null
110+
response:
111+
error: INVALID_IN_STATE
108112

109113
- label: "Read back speed setting"
110114
command: "readAttribute"

0 commit comments

Comments
 (0)