Page 1 of 1

endif vs endon

Posted: 17 Jan 2019, 16:15
by DaveS
Hi Chaps,
Could someone explain the difference between endif and endon used in espeasy rules and when each one should be used ?
I have looked at the wiki and it seems endif is needed when if / else statements are used,would like some further explanation.
cheers

Re: endif vs endon

Posted: 17 Jan 2019, 16:25
by iron
Hello,

Endon ends an "On event"
Endif ends and If

on <trigger> do
if <test>
<action>
<action>
endif
endon

More here :

https://espeasy.readthedocs.io/en/lates ... Rules.html

-D

Re: endif vs endon

Posted: 17 Jan 2019, 16:40
by DaveS
Thanks,
Are looking at the linked age now,
Cheers