Skip to content

Commit

Permalink
[ICP-12754] Fix for: "Qubino Flush On Off Thermostat 2 – Cannot set a…
Browse files Browse the repository at this point in the history
… heating temperature" (SmartThingsCommunity#56512)

* Cast values to double

* Cast minSetpointTemp to double
  • Loading branch information
MGoralczykS authored Jan 22, 2021
1 parent e6e6085 commit 7308963
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def setCoolingSetpoint(setpoint) {

def updateSetpoint(setpoint, setpointType) {
setpoint = temperatureScale == 'C' ? setpoint : fahrenheitToCelsius(setpoint)
setpoint = Math.max(Math.min(setpoint, maxSetpointTemperature), minSetpointTemperature)
setpoint = Math.max(Math.min(setpoint.doubleValue(), maxSetpointTemperature.doubleValue()), minSetpointTemperature.doubleValue())
[
secure(zwave.thermostatSetpointV2.thermostatSetpointSet([precision: 1, scale: 0, scaledValue: setpoint, setpointType: setpointType, size: 2])),
"delay 2000",
Expand Down

0 comments on commit 7308963

Please sign in to comment.