Automation trigger doesn't work. What I doing wrong?

I have automation that don’t start at all. Condition for trigger is met.

- alias: 'Edyta far from home'
  trigger:
    platform: template
    value_template: "{{ states.sensor.edyta_to_home.state | int > 40 }}"
  action:
    service: notify.html5
    data_template:
      title: 'Edyta daleko od domu'
      message: "Edyta jest {{ states.sensor.edyta_to_home.state }} minut od domu"

sensor.edyta_to_home is a sensor from platform google_travel_time. What I’am doing wrong?

I can never get template triggers to work for me. But template sensors do. So I usually set up a sensor with the same value template, then watch the state of that sensor in my automation trigger.