Define val constants at the top of the rule file, this way you only have to change them there instead of scrolling down and looking for them whenever there is a need to change them
val SHUTTER1_TEMP = 76
val SHUTTER2_TEMP = 78
val LOWFAN_TEMP = 79
val SINGLESPEEDFAN_TEMP = 85
rule "temperature"
when
Item Indoor_Temperature changed
then
logInfo("Temp Rule",Indoor_Temperature.state.toString)
if (Indoor_Temperature.state >= SHUTTER1_TEMP) {
Shutter1.sendCommand(ON)
} else {
Shutter1.sendCommand(OFF)
}
if (Indoor_Temperature.state >= SHUTTER2_TEMP) {
Shutter2.sendCommand(ON)
} else {
Shutter2.sendCommand(OFF)
}
if (Indoor_Temperature.state >= LOWFAN_TEMP) {
LowFan.sendCommand(ON)
} else {
LowFan.sendCommand(OFF)
}
if (Indoor_Temperature.state >= SINGLESPEEDFAN_TEMP) {
SingleSpeedFan.sendCommand(ON)
} else {
SingleSpeedFan.sendCommand(OFF)
}
end