diff --git a/Rule-Cookbook.md b/Rule-Cookbook.md index b7186be7..cce20273 100644 --- a/Rule-Cookbook.md +++ b/Rule-Cookbook.md @@ -320,8 +320,8 @@ An available button is configured as switch to set thermostat ON or OFF ``` Rule1 on switch1#state do backlog event toggling1=%mem1% endon - on event#toggling1=0 do mem 1 endon - on event#toggling1=1 do mem 0 endon + on event#toggling1=0 do mem1 1 endon + on event#toggling1=1 do mem1 0 endon ``` Check temp sensor connection. If fails, set to off and turn off thermostat. Also continue checking @@ -370,8 +370,8 @@ RULES: Rule1 on system#boot do RuleTimer1 70 endon on Switch1#State do event toggling1=%mem1% endon - on event#toggling1=0 do mem 1 endon - on event#toggling1=1 do mem 0 endon + on event#toggling1=0 do mem1 1 endon + on event#toggling1=1 do mem1 0 endon on Rules#Timer=1 do backlog var1 0; RuleTimer1 70; power1 0 endon on tele-SI7021#temperature do backlog var1 1; RuleTimer1 70; event ctrl_ready=1; event temp_demand=%value% endon on event#ctrl_ready>%mem1% do var1 0 endon @@ -385,8 +385,8 @@ EXAMPLE RULES WITHOUT TEMP SENSOR TO TEST THE THERMOSTAT RULES Rule1 on system#boot do RuleTimer1 70 endon on Switch1#State do event toggling1=%mem1% endon - on event#toggling1=0 do mem 1 endon - on event#toggling1=1 do mem 0 endon + on event#toggling1=0 do mem1 1 endon + on event#toggling1=1 do mem1 0 endon on Rules#Timer=1 do backlog var1 0; RuleTimer1 70; power1 0 endon on event#temp do backlog var1 1; RuleTimer1 70; event ctrl_ready=1; event temp_demand=%value% endon on event#ctrl_ready>%mem1% do var1 0 endon @@ -405,8 +405,8 @@ TESTS: TIMERS: * With the above the timers can be used to control mem1 and add a schedule to when the thermostat will be enabled - `Rule2 on Clock#Timer=1 do mem 1 endon -on Clock#Timer=2 do mem 0 endon` + `Rule2 on Clock#Timer=1 do mem1 1 endon +on Clock#Timer=2 do mem1 0 endon` [Back To Top](#top)