Templating a stateDuration alert task

The link that I couldn’t include: