Can't get automations trigger via input_datetime

Can’t get automations trigger via input_datetime:

input_datetime:
  only_time:
    name: Artificial sunrise time
    has_date: false
    has_time: true

Neither this trigger:

trigger:
  - platform: template
    value_template: '{{ states.sensor.time.state == states.input_datetime.only_time.state[0:5]}}'

Nor this work:

trigger:
  - platform: time
    at: input_datetime.only_time

What am I missing here?
Thank you!