Last Triggered more than 10min in node red

Tags: #<Tag:0x00007f326c58ebc0> #<Tag:0x00007f326c58ead0>

Hey Guys,
I’m trying to work out how to get node red to check when a script was last triggered and compare it to the time now and then activate that script if more than 10 minutes has past. I have an automation with a template in home assistant which works, however I wanted to switch it to node red.

Here is the home assistant automation code:

alias: Temp High >> LR AC ON

  description: ''


  - platform: template

    value_template: '{{ states(''sensor.hue_motion_sensor_1_temperature'')|float >

      states(''input_number.room_temp_max'')|float }}'


  - condition: template

    value_template: "{% set last = state_attr('automation.high_temp_sense_lounge_room', 'last_triggered') %}  {{ last is none or (now() - last).total_seconds() > 120 }}"


  - service: script.ac_high_temp_on

    data: {}

Kind Regards,