Hello and sorry for writing in English. I am having problems with the after function. In this example, I want the light to turn on when I press on, and to turn off: during the day, immediately, but at night after 10 seconds. I wrote this
However, at night the light never turns off. Any idea what is wrong?
Thank you,
Daniel
Code:
if (event("Luz Techo Hab Ppal Int-1/2/0") and ("Luz Techo Hab Ppal Int-1/2/0"==ON)) then \\
write("Luz_Techo_HPrinc-1/2/13",ON) \\
endif
if (event("Luz Techo Hab Ppal Int-1/2/0") and (sun()==1b01) and ("Luz Techo Hab Ppal Int-1/2/0"==OFF)) then \\
write ("Luz_Techo_HPrinc-1/2/13",OFF) \\
endif
if (event("Luz Techo Hab Ppal Int-1/2/0") and (sun()==0b01) and (after("Luz Techo Hab Ppal Int-1/2/0"==OFF,10000u64))) then \\
write ("Luz_Techo_HPrinc-1/2/13",OFF) \\
endif
Thank you,
Daniel


Kommentar