mirror of https://github.com/arendst/Tasmota.git
Updated Rules (markdown)
parent
ffed5904d9
commit
40e9b37957
30
Rules.md
30
Rules.md
|
@ -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:
|
||||
|
||||
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`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
**For examples of various rules see the [Rule Cookbook](Rule-Cookbook).**
|
||||
|
||||
|
|
Loading…
Reference in New Issue