From a121c8e12a2d73afece3bb82476dc4b6a70c6c82 Mon Sep 17 00:00:00 2001 From: Michael Ingraham <34340210+meingraham@users.noreply.github.com> Date: Mon, 11 Feb 2019 10:26:44 -0500 Subject: [PATCH] Updated Rules (markdown) --- Rules.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Rules.md b/Rules.md index a3eb51dc..ddbb237d 100644 --- a/Rules.md +++ b/Rules.md @@ -923,7 +923,7 @@ So, - As an example: -**_[ assuming gpio0 is configured as button1 ]_** +**_[ assuming GPIO0 is configured as Button1 ]_** And that you want: @@ -942,7 +942,7 @@ rule 1 - Another example: -**_[ assuming gpio0 is configured as button1 ]_** +**_[ assuming GPIO0 is configured as Button1 ]_** And that you want: @@ -951,35 +951,35 @@ And that you want: **hold 2 secs**: send another mqtt message ``` -buttontopic 0 -setoption1 1 -setoption11 0 -setoption32 20 +ButtonTopic 0 +SetOption1 1 +SetOption11 0 +SetOption32 20 rule on button1#state=3 do publish cmnd/topicHOLD/power 2 endon on button1#state=2 do publish cmnd/topicSINGLEPRESS/power 2 endon rule 1 ``` -please note that `setoption11 0`. +please note that `SetOption11 0`. -**_SWITCHS WITH 2 DIFFERENT ACTIONS_** +**_SWITCHES WITH 2 DIFFERENT ACTIONS_** -**Switchs do not have double press feature** +**Switches do not have double press feature** - Example: -**_[ assuming gpio0 is configured as switch1 and that you have a pushbutton connected ]_** +**_[ assuming GPIO0 is configured as Switch1 and that you have a pushbutton connected ]_** And that you want: -**single press**: do nothing -**hold 2 secs**: toggle relay 1 +**single press**: Do nothing +**hold 2 secs**: Toggle relay 1 ``` -switchtopic1 0 -switchmode1 5 -setoption32 20 -rule on switch1#state=3 do power1 2 endon on switch1#state=2 do delay endon -rule 1 +SwitchTopic1 0 +SwitchMode1 5 +SetOption32 20 +Rule on Switch1#State=3 do Power1 2 endon on Switch1#State=2 do Delay endon +Rule 1 ``` [BackToExamples](https://github.com/arendst/Sonoff-Tasmota/wiki/Rules#examples)