Wait_template bot going further

Hello,
I got a problem with the wait_template, when my template is changing from false to true it is not going further and stuck. I want to have one random time per hour to turn a switch on. Here is my automation:

alias: Home Assistant - Kritzelbob
description: ""
trigger:
  - platform: time_pattern
    minutes: "0"
condition: []
action:
  - service: input_number.set_value
    target:
      entity_id: input_number.randomtime
    data:
      value: >-
        {{ range(0, (state_attr('input_number.randomtime','max') | int)) |
        random }}
  - wait_template: >-
      (as_timestamp(now()) | timestamp_custom('%M') | int) ==
      (states('input_number.randomtime') | int)
    continue_on_timeout: false
  - service: switch.turn_on
    data: {}
    target:
      entity_id: switch.kritzel_bob
mode: restart

Thanks!

Got help at the discord.
I missed the {{ }}

  - wait_template: >-
      {{ (as_timestamp(now()) | timestamp_custom('%M') | int) ==
      (states('input_number.randomtime') | int) }}