From bfe719077d83c0687209e30acfbb3d611bc5cab2 Mon Sep 17 00:00:00 2001 From: Theo Arends Date: Thu, 26 Apr 2018 17:56:47 +0200 Subject: [PATCH] Add once example --- Rules.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Rules.md b/Rules.md index fdee0c07..17e569e3 100644 --- a/Rules.md +++ b/Rules.md @@ -117,18 +117,18 @@ Hardware Software - Sonoff-Tasmota v5.12.0l or up with define USE_RULES enabled -- Configure timer3 for rule execution when activated: ``timer3 {"Arm":1,"Mode":0,"Time":"16:00","Days":"1111111","Repeat":1,"Output":1,"Action":3}`` +- Configure timer5 for rule execution when activated: ``timer5 {"Arm":1,"Mode":0,"Time":"16:00","Days":"1111111","Repeat":1,"Action":3}`` Rule -- ``on clock#timer=3 do backlog power2 on;power1 off;power3 2 endon`` +- ``on clock#timer=5 do backlog power2 on;power1 off;power3 2 endon`` Result - When the timer expires the rule kicks in and set Power1 to OFF, Power2 to ON and Toggles Power3 -If you want to have blink functionality define a rule like ``on clock#timer=3 do power 3 endon`` +If you want to have blink functionality define a rule like ``on clock#timer=5 do power 3 endon`` #### 4. Usage of one-shot (once) -The once option (``rule 4/5/6``) provides the possibility to trigger on a slow change while the change is still within the bounds of the test. +The rule command once option provides the possibility to trigger only once on a slow change while the change is still within the bounds of the test. Rule - ``on ENERGY#Current>0.100 do publish tool/tablesaw/power 1 endon on ENERGY#Current<0.100 do publish tool/tablesaw/power 0 endon``