Skip to content

Instantly share code, notes, and snippets.

@gpmontt
Last active January 9, 2022 13:01
Show Gist options
  • Save gpmontt/651ec103ee90db78f65a42ecc2b8f8ff to your computer and use it in GitHub Desktop.
Save gpmontt/651ec103ee90db78f65a42ecc2b8f8ff to your computer and use it in GitHub Desktop.
example rules with clock, timers and switch(PIR)

Rules Tasmota

Activete Rule Before Dawn and At Dust

  • activate switch button as pushbutton
switchmode1 2; <- 
rule1 
  on switch1#state do backlog power1 1; RuleTimer1 30 endon  
  on Rules#Timer=1 do power1 off endon
  on 

Controlling Timers Enabled from a Switch

Assuming that your switch is on GPIO00 and configured as Switch1:

SwitchMode1 1

Rule1
  on Switch1#state=1 do Timers 0 endon
  on Switch1#state=0 do Timers 1 endon

Rule1 1

tasmota docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment