It should, and you can tell that it’s a problem with the syntax highlighting.
@dudester, start by adding quotes around the time value and go from there.
One quirk with delays is that if the automation triggers and hits a delay and then the automation triggers again, execution will immediately fall through the delay (but doesn’t re-execute any of the earlier steps). There’s a thread about it here, and it’s possible that it could be affecting you.
You need to explain more about what “doesn’t work” means. That is way too vague.
Although, one thing to check (since I don’t see anything obviously wrong with your automation) is if the automation is turned on. It was a common problem that automations could easily be turned off under certain conditions.
Yes automations are ON.
The automation works except the delay is ignored, always worked perfectly with delay occurring before upgrade. I have other routines with delays in the same format which all now no longer delaying at all.
I did see something about an alternative using script but I didnt understand how to do that.
If switch.sprinklers changes to on, then changes to off and back to on again before the two minute delay is complete, then yes, the result would be that the delay would be aborted and the automation would continue with the next step. (I.e., it does not restart the actions from the beginning.)
Do you think that might be happening?
You should look in home-assistant.log. E.g., when one of my automations runs which contains a delay I see these in the log:
2019-09-07 14:46:48 INFO (MainThread) [homeassistant.helpers.script] Script Foyer Snapshot: Running script
2019-09-07 14:46:48 INFO (MainThread) [homeassistant.helpers.script] Script Foyer Snapshot: Executing step call service
2019-09-07 14:46:48 INFO (MainThread) [homeassistant.helpers.script] Script Foyer Snapshot: Executing step delay 0:00:01
2019-09-07 14:46:50 INFO (MainThread) [homeassistant.helpers.script] Script Foyer Snapshot: Executing step call service
Note that the action part of an automation is actually a script and is therefore executed by the homeassistant.helpers.script module.