Updated Rules (markdown)

Michael Ingraham 2019-06-16 08:23:54 -04:00
parent ffed5904d9
commit 40e9b37957
1 changed files with 15 additions and 15 deletions

@ -135,6 +135,19 @@ To accomplish a rule with one trigger but several commands, you need to use `Bac
```on [trigger] do backlog [command1]; [command2]; [command3] endon```
**Appending a rule onto an existing rule set**
Use the `+` character to append a new rule to the rule set. For example:
    Existing Rule1: `on Rules#Timer=1 do Mem2 %time% endon`
    Rule to append: `on button1#state do POWER TOGGLE endon`
    Command: `Rule1 + on button1#state do POWER TOGGLE endon`
    Resulting Rule1: `on Rules#Timer=1 do Mem2 %time% endon on button1#state do POWER TOGGLE endon`
### Rule Variables
There are 10 available variables (double precision reals) in Tasmota, `Var1` through `Var5` and `Mem1` through `Mem5`. All `Var` will be empty strings when the program starts. The value of all `Mem` persists after a reboot.
@ -175,21 +188,8 @@ Sets Mem2 to the current time (minutes elapsed since midnight)
<br>
After a Wi-Fi reconnect event publish to stat/topic/BLACKOUT a payload containing timestamps of when the Wi-Fi disconnected in *From:* and when the Wi-Fi connected in *To:*.
**Appending a rule onto an existing rule set**
Use the `+` character to append a new rule to the rule set. For example:
&nbsp;&nbsp;&nbsp;&nbsp;Existing Rule1: `on Rules#Timer=1 do Mem2 %time% endon`
&nbsp;&nbsp;&nbsp;&nbsp;Rule to append: `on button1#state do POWER TOGGLE endon`
&nbsp;&nbsp;&nbsp;&nbsp;Command: `Rule1 + on button1#state do POWER TOGGLE endon`
&nbsp;&nbsp;&nbsp;&nbsp;Resulting Rule1: `on Rules#Timer=1 do Mem2 %time% endon on button1#state do POWER TOGGLE endon`
&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;
&nbsp;
**For examples of various rules see the [Rule Cookbook](Rule-Cookbook).**