Updated Rule Cookbook (markdown)

Michael Ingraham 2019-08-03 15:54:13 -04:00
parent 3fb1d7aa18
commit 83293ba32a
1 changed files with 4 additions and 4 deletions

@ -1291,16 +1291,16 @@ Rule3
#### Remote Control Button Multi-press
For example, a remote control with one button to change speed. This rules simulates pressing the button three times to set the receiving device to the third speed setting.
//Specify the rule set
//The `<trigger>` can be a a condition, an event sent from another device or home automation hub.
//`<topic>` corresponds to the device transmitting the code (e.g., [YTF IR Bridge](YTF-IR-Bridge)). This could also be modified to send an RF code from a [Sonoff RF Bridge](Sonoff-RF-Bridge-433).
//Specify the rule set
//The `<trigger>` can be a a condition, an event sent from another device or home automation hub.
//`<topic>` corresponds to the device transmitting the code (e.g., [YTF IR Bridge](YTF-IR-Bridge)). This could also be modified to send an RF code from a [Sonoff RF Bridge](Sonoff-RF-Bridge-433).
```
Rule 1
ON Event#tora DO Publish cmnd/<topic>/IRSend {"Protocol":"NEC","Bits":32,"Data":"0x00FF30CF"} ENDON
ON <trigger> DO Backlog Event tora; Event tora; Event tora ENDON
```
//Enable the Rule set
//Enable the Rule set
```
Rule1 1
```