Trigger device and input_number

hello I would like to like on the page Automation Trigger - Home Assistant

for:
minutes: Use “{{states (‘input_number.high_temp_min’) | int}}”
but unfortunately this does not work for me

my code currently looks like this

platform: device
type: turned_on
device_id: 9ddf70d68a533b687fxxxxxxx
entity_id: light.therapie
domain: light
for:
  hours: 0
  minutes: {{ states('input_number.minutes') | int }}
  seconds: 0
  milliseconds: 0
trigger:
  - platform: state
    entity_id: light.therapie
    to: 'on'
    for:
      minutes: >-
        {{ states('input_number.minutes') | int(0) }}

OR

trigger:
  - platform: state
    entity_id: light.therapie
    to: 'on'
    for:
      minutes: "{{ states('input_number.minutes') | int(0) }}"

I cannot use platform: state at this point (shelly with switch and not with button)

Sorry, I don’t understand why you cannot use platform: state. What entity do you have? Can you elaborate more?

Well it pops up when I don’t select state.

When you use platform:state like the below picture, what happen when you try to select light.therapie?

it does not exist. only if I can select the device.
has something to do with the shelly and the setting that is set for the hardware switch / button. I have to choose edge at this point, because otherwise no automation would really be possible.
if buttons were installed, state would not be a problem either.
is at least like that in the current shelly implementation of the shelly 2.5.