From b292351dea233efc6705222b14ffda673c900422 Mon Sep 17 00:00:00 2001 From: Hunsup Jung Date: Tue, 23 Jan 2024 06:51:08 +0900 Subject: [PATCH] Change the checking process from ordering of enums to EnsureKnownEnumValue function Signed-off-by: Hunsup Jung --- 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 2eb5b47c6f411f..57e8211e9c1471 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server.cpp @@ -442,7 +442,7 @@ MatterThermostatClusterServerPreAttributeChangedCallback(const app::ConcreteAttr } auto RequestedSystemMode = static_cast(*value); if (ControlSequenceOfOperation > ControlSequenceOfOperationEnum::kCoolingAndHeatingWithReheat || - RequestedSystemMode > SystemModeEnum::kSleep) + EnsureKnownEnumValue(RequestedSystemMode) != SystemModeEnum::kUnknownValue) { return imcode::InvalidValue; }