Skip to content

Commit

Permalink
Bugfix for thermostat MaxCoolSetPointLimit value
Browse files Browse the repository at this point in the history
  • Loading branch information
KiranKumar committed Jul 28, 2023
1 parent b6caecf commit bee2ab1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/clusters/thermostat-server/thermostat-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -349,11 +349,11 @@ MatterThermostatClusterServerPreAttributeChangedCallback(const app::ConcreteAttr
requested = static_cast<int16_t>(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;
Expand Down

0 comments on commit bee2ab1

Please sign in to comment.