diff --git a/Rule-Cookbook.md b/Rule-Cookbook.md index 377a5925..49f607c5 100644 --- a/Rule-Cookbook.md +++ b/Rule-Cookbook.md @@ -34,6 +34,7 @@ - [Solar heater control](#solar-heater-control) - [IR Forward](#ir-forward) - [Garage Door Opener](#Garage-Door-Opener) +- [Remote Control Button Multi-press](#Remote-Control-Button-Multi-press) ------------------------------------------------------------------------------ #### Use long press action on a switch @@ -1284,3 +1285,25 @@ Rule3 `Backlog Rule1 1; Rule2 1; Rule3 1` [Back To Top](#top) + +------------------------------------------------------------------------------ + +#### 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 `` can be a a condition, an event sent from another device or home automation hub. +//`` 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//IRSend {"Protocol":"NEC","Bits":32,"Data":"0x00FF30CF"} ENDON +ON DO Backlog Event tora; Event tora; Event tora ENDON +``` + +//Enable the Rule set +``` +Rule1 1 +``` + +[Back To Top](#top) +