I’m trying to get a rule working that adjusts my thermostat heating setpoint by using the rule below. However when the rule loads I get the error below. Any pointers?
2018-11-20 19:07:21.525 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model ‘Heating.rules’, using it anyway:
The value of the local variable newSetpoint is not used
The value of the local variable newSetpoint is not used
The value of the local variable newSetpoint is not used
The value of the local variable newSetpoint is not used
The value of the local variable newSetpoint is not used
rule "Change Heating SetPoint"
when
Item Time_Of_Day changed
then
var newSetpoint = null
if(Time_Of_Day.state == "MORNING") {
val newSetpoint = Heating_Setpoint_Morning.state as Number
} else if (Time_Of_Day.state == "DAY") {
val newSetpoint = Heating_Setpoint_Day.state as Number
} else if (Time_Of_Day.state == "EVENING") {
val newSetpoint = Heating_Setpoint_Evening.state as Number
} else if (Time_Of_Day.state == "NIGHT") {
val newSetpoint = Heating_Setpoint_Night.state as Number
} else if (Time_Of_Day.state == "BED") {
val newSetpoint = Heating_Setpoint_Bed.state as Number
}
logInfo("Heating","New Setpoint: " + newSetpoint)
Group_SetPoint_Command.sendCommand(newSetpoint)
end