I've used this many times to only allow an alert to be sent if it hasn't happened in the last hour.
I've been pulling my hair out why it's not working in a new automation I created. In the Dev -> Template tool it evaluates to True but not in automation conditions.
Any ideas? (BTW I usually use this.entity_id rather than the hardcoded id)
true if state_attr('automation.alert_dispatches_monitoring_offline','last_triggered') is none else (as_timestamp(now())-as_timestamp(state_attr('automation.alert_dispatches_monitoring_offline','last_triggered')))>3600