OK, so I spent about an hour to figure out how the main rule works in @Confused 's config but I think I’m getting there ![]()
I was able to come up with this for my own setup; I have 3 floors, but the basement pump turns on the heater so that has to be turned on when any of the 3 floors need heating; similarly when something no longer needs heating, the basement pump can only be turned off after nothing needs heating. Is there a better approach to design this in a rule (I was trying to follow @rlkoshak 1-2-3 rule design pattern)?
when
Member of gHneed changed
then
if(BF_Heat_need == ON) {
BF_Heating_Pump.sendCommand(ON)
} else if(GF_Heat_need == ON) {
BF_Heating_Pump.sendCommand(ON)
GF_Heating_Pump.sendCommand(ON)
} else if (FF_Heat_need == ON) {
BF_Heating_Pump.sendCommand(ON)
FF_Heating_Pump.sendCommand(ON)
} else if(GF_Heat_need == OFF) {
GF_Heating_Pump.sendCommand(OFF)
} else if (FF_Heat_need == OFF) {
FF_Heating_Pump.sendCommand(OFF)
} else if (BH_Heat_need == OFF && GF_Heat_need == OFF && FF_Heat_need == OFF) {
BH_Heating_Pump.sendCommand(OFF)
}
end