#Condition to check if automation ran recently isn’t working

1 messages · Page 1 of 1 (latest)

still willow
#

Hi all, can someone smarter than me gently explain why my template condition isn’t working… I want the automation it’s attached to only run if the automation hasn’t fired in the last minute. I thought this should work but it seems like the condition never passes:

condition: template value_template: >- {{ now() > (this.attributes.last_triggered | default(as_datetime(0))) + timedelta(minutes = 1) }}

lone swan
#

Because it just triggered

#

Just add a delay of 1 minute at the end, no condition required