From 1ff05c8aa68174c1ed3651cb92bfac78a2a4455e Mon Sep 17 00:00:00 2001 From: Arun Padakanti Date: Wed, 30 Oct 2024 16:06:41 +0530 Subject: [PATCH] Updated return value when null is written as per spec --- src/app/clusters/fan-control-server/fan-control-server.cpp | 4 ++-- src/app/tests/suites/TestFanControl.yaml | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/clusters/fan-control-server/fan-control-server.cpp b/src/app/clusters/fan-control-server/fan-control-server.cpp index 46f4c6d7c0..72171693a0 100644 --- a/src/app/clusters/fan-control-server/fan-control-server.cpp +++ b/src/app/clusters/fan-control-server/fan-control-server.cpp @@ -198,7 +198,7 @@ MatterFanControlClusterServerPreAttributeChangedCallback(const ConcreteAttribute } else { - res = Status::WriteIgnored; + res = Status::InvalidInState; } } else @@ -234,7 +234,7 @@ MatterFanControlClusterServerPreAttributeChangedCallback(const ConcreteAttribute } else { - res = Status::WriteIgnored; + res = Status::InvalidInState; } } else diff --git a/src/app/tests/suites/TestFanControl.yaml b/src/app/tests/suites/TestFanControl.yaml index 92fca4f2a6..663bdf9e64 100644 --- a/src/app/tests/suites/TestFanControl.yaml +++ b/src/app/tests/suites/TestFanControl.yaml @@ -69,6 +69,8 @@ tests: attribute: "PercentSetting" arguments: value: null + response: + error: INVALID_IN_STATE - label: "Read back percent setting" command: "readAttribute" @@ -105,6 +107,8 @@ tests: attribute: "SpeedSetting" arguments: value: null + response: + error: INVALID_IN_STATE - label: "Read back speed setting" command: "readAttribute"