You first have to find out, what exactly isn’t working.
Try looking at the automation history. Settings > Automations & Scenes
and take a look, what happened when the automation was last run. The clock at the right after your automation name.
This is the first step. After that, you can add a timeout value (what I’d suggest for every wait_template
), to see, if the automation goes further after the timeout.
Right now you’re doing “try & error”, this will not lead to a fast solution. First of all, check what the automation does. And then we’ll see, where we need to step in and change things.