From bee2ab13629812519a77ee4b07c375b77502809c Mon Sep 17 00:00:00 2001 From: KiranKumar Date: Fri, 28 Jul 2023 13:16:49 +0530 Subject: [PATCH] Bugfix for thermostat MaxCoolSetPointLimit value --- src/app/clusters/thermostat-server/thermostat-server.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp index 85fa7c7a035322..53087a76206c8c 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server.cpp @@ -297,7 +297,7 @@ MatterThermostatClusterServerPreAttributeChangedCallback(const app::ConcreteAttr return imcode::InvalidValue; if (AutoSupported) { - if (requested < OccupiedHeatingSetpoint + DeadBandTemp) + if (requested > OccupiedHeatingSetpoint + DeadBandTemp) return imcode::InvalidValue; } return imcode::Success; @@ -349,11 +349,11 @@ MatterThermostatClusterServerPreAttributeChangedCallback(const app::ConcreteAttr requested = static_cast(chip::Encoding::LittleEndian::Get16(value)); if (!HeatSupported) return imcode::UnsupportedAttribute; - if (requested < AbsMinHeatSetpointLimit || requested < MinHeatSetpointLimit || requested > AbsMaxHeatSetpointLimit) + if (requested < AbsMinHeatSetpointLimit || requested < MinHeatSetpointLimit || requested < AbsMaxHeatSetpointLimit) return imcode::InvalidValue; if (AutoSupported) { - if (requested > MaxCoolSetpointLimit - DeadBandTemp) + if (requested < MaxCoolSetpointLimit - DeadBandTemp) return imcode::InvalidValue; } return imcode::Success;