Automation not triggering for template sensor

Hello!

I’m trying to setup an automation for my dryer with a vibration sensor but something appears to be wrong. I have my automation setup like this:

- alias: Laundry - Dryer stop (Vibration)
  id: dryer_stop_vibration
  trigger: 
    - platform: template
      value_template: "(((as_timestamp(now()) - as_timestamp(states.sensor.dryer_vibration_sensor_action.last_changed)) / 60) | round(0)) > 3"
  condition:
    - condition: state
      entity_id: input_boolean.dryer_on
      state: 'on'
  action:
    - service: notify.me
      data:
        message: 'The dryer has stopped at {{now().strftime("%I:%M %p")}}'
    - entity_id: input_boolean.dryer_on
      service: input_boolean.turn_off

It’s looking to see if the vibration sensor was updated in the last 3 minutes and if there’s been no update to send an alert. But I never get alerted and the boolean never gets turned off. I’ve pasted the value_template into the template editor demo and that seems to be giving the correct results (currently the value is 15). The boolean is currently on so I’m not sure where I messed up. Any ideas?

Templates need to be enclosed in double braces {{ }} your trigger template is not.