I need it to turn off after 10 seconds of this switch. Please tell me how to spell it correctly. For clarity, I’ll throw off a non-working example, it shows what I need.
i guess you technically could do it that way but it depends on the trigger (which you didn’t provide) and how the conditions inside the service template change between those different triggers.
Since the info you provided was so limited I just based it off of that.
But to be more clear…
the way you have it (ignoring anything outside of the template) it won’t do what you want.
it seems (and I could be wrong) that you expect the “elif” to wait until the switch has been on for 10 seconds after it was turned on by the switch.turn_on service in the “if” portion but that’s not the way it works.
the template evaluates the “if” and if true executes that service, otherwise it checks the “elif” and true executes that service. If neither are true the automation aborts and does nothing further even if there are additional action steps after that.
Once the “if” is true and the switch.turn_on service is called the sequence steps move on to the next set of actions in the automation and the “elif” is never evaluated until the next trigger occurs.