From 4fa4b2faca6fa762eb80cabfa2fb83608703f0e0 Mon Sep 17 00:00:00 2001
From: Sting Chang <houlunc@google.com>
Date: Fri, 13 Sep 2024 22:35:36 +0800
Subject: [PATCH 1/2] fan rocksetting; thermostat dry mode

---
 ...tnode_roomairconditioner_9cf3607804.matter |  4 ++-
 ...rootnode_roomairconditioner_9cf3607804.zap | 34 ++++++++++++++++++-
 .../thermostat-server/thermostat-server.cpp   |  2 +-
 3 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter
index 654c955586b685..d1a64468f08717 100644
--- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter
+++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter
@@ -2162,12 +2162,14 @@ endpoint 1 {
     ram      attribute fanModeSequence default = 2;
     ram      attribute percentSetting default = 0;
     ram      attribute percentCurrent default = 0;
+    ram      attribute rockSupport default = 0x00;
+    ram      attribute rockSetting default = 0x00;
     ram      attribute airflowDirection default = 0;
     callback attribute generatedCommandList;
     callback attribute acceptedCommandList;
     callback attribute eventList;
     callback attribute attributeList;
-    ram      attribute featureMap default = 33;
+    ram      attribute featureMap default = 37;
     ram      attribute clusterRevision default = 1;
 
     handle command Step;
diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap
index 80384bf72b175b..2f83687a3e6955 100644
--- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap
+++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap
@@ -3032,6 +3032,38 @@
               "maxInterval": 65534,
               "reportableChange": 0
             },
+            {
+              "name": "RockSupport",
+              "code": 7,
+              "mfgCode": null,
+              "side": "server",
+              "type": "RockBitmap",
+              "included": 1,
+              "storageOption": "RAM",
+              "singleton": 0,
+              "bounded": 0,
+              "defaultValue": "0x00",
+              "reportable": 1,
+              "minInterval": 1,
+              "maxInterval": 65534,
+              "reportableChange": 0
+            },
+            {
+              "name": "RockSetting",
+              "code": 8,
+              "mfgCode": null,
+              "side": "server",
+              "type": "RockBitmap",
+              "included": 1,
+              "storageOption": "RAM",
+              "singleton": 0,
+              "bounded": 0,
+              "defaultValue": "0x00",
+              "reportable": 1,
+              "minInterval": 1,
+              "maxInterval": 65534,
+              "reportableChange": 0
+            },
             {
               "name": "AirflowDirection",
               "code": 11,
@@ -3122,7 +3154,7 @@
               "storageOption": "RAM",
               "singleton": 0,
               "bounded": 0,
-              "defaultValue": "33",
+              "defaultValue": "37",
               "reportable": 1,
               "minInterval": 1,
               "maxInterval": 65534,
diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp
index 9e6e0f074d5e52..33dfad316a9601 100644
--- a/src/app/clusters/thermostat-server/thermostat-server.cpp
+++ b/src/app/clusters/thermostat-server/thermostat-server.cpp
@@ -779,7 +779,7 @@ MatterThermostatClusterServerPreAttributeChangedCallback(const app::ConcreteAttr
         }
         auto RequestedSystemMode = static_cast<SystemModeEnum>(*value);
         if (ControlSequenceOfOperation > ControlSequenceOfOperationEnum::kCoolingAndHeatingWithReheat ||
-            RequestedSystemMode > SystemModeEnum::kFanOnly)
+            RequestedSystemMode > SystemModeEnum::kSleep)
         {
             return Status::InvalidValue;
         }

From fb108c9165340f72ec970b2cb98ca2faf6ce8ecd Mon Sep 17 00:00:00 2001
From: Sting Chang <houlunc@google.com>
Date: Wed, 18 Sep 2024 12:20:21 +0800
Subject: [PATCH 2/2] revert change

---
 src/app/clusters/thermostat-server/thermostat-server.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp
index 33dfad316a9601..9e6e0f074d5e52 100644
--- a/src/app/clusters/thermostat-server/thermostat-server.cpp
+++ b/src/app/clusters/thermostat-server/thermostat-server.cpp
@@ -779,7 +779,7 @@ MatterThermostatClusterServerPreAttributeChangedCallback(const app::ConcreteAttr
         }
         auto RequestedSystemMode = static_cast<SystemModeEnum>(*value);
         if (ControlSequenceOfOperation > ControlSequenceOfOperationEnum::kCoolingAndHeatingWithReheat ||
-            RequestedSystemMode > SystemModeEnum::kSleep)
+            RequestedSystemMode > SystemModeEnum::kFanOnly)
         {
             return Status::InvalidValue;
         }