mirror of https://github.com/arendst/Tasmota.git
Add once example
parent
9a211a08fe
commit
bfe719077d
8
Rules.md
8
Rules.md
|
@ -117,18 +117,18 @@ Hardware
|
||||||
|
|
||||||
Software
|
Software
|
||||||
- Sonoff-Tasmota v5.12.0l or up with define USE_RULES enabled
|
- 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
|
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
|
Result
|
||||||
- When the timer expires the rule kicks in and set Power1 to OFF, Power2 to ON and Toggles Power3
|
- 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)
|
#### 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
|
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``
|
- ``on ENERGY#Current>0.100 do publish tool/tablesaw/power 1 endon on ENERGY#Current<0.100 do publish tool/tablesaw/power 0 endon``
|
||||||
|
|
Loading…
Reference in New Issue