Datetime Automation help please

Not sure what’s wrong with this automation:

alias: Quick Charge
description: ""
trigger:
  - platform: state
    entity_id:
      - input_button.quick_charge
condition: []
action:
  - service: number.set_value
    data:
      value: "100"
    target:
      entity_id: number.lux_ac_battery_charge_level
  - wait_for_trigger:
      - platform: time
        at: input_datetime.quick_charge_time_start
  - service: switch.turn_on
    data: {}
    target:
      entity_id: switch.lux_ac_charge_enable
  - wait_for_trigger:
      - platform: time
        at: input_datetime.quick_charge_time_end
  - service: switch.turn_off
    data: {}
    target:
      entity_id: switch.lux_ac_charge_enable
mode: single

Basically, it should work like this: I set “quick_charge_time_start” and “quick_charge_time_end”, then hit the “quick_charge” button. Traces show that the automation stalls when it gets to

 - wait_for_trigger:
      - platform: time
        at: input_datetime.quick_charge_time_start

trace:

wait:
  remaining: null
  trigger: null

Checking the helper entity, the time is set correctly. Should the code be written differently there? Using quotes or brackets? Have tried various combinations of quotes and brackets without any luck.

Have you tried writing the automation (again) using the UI, converting it to YAML and comparing?

Writing the automation through UI comes up with the exact same code and same issue unfortunately. Worth a try though.

just to double-check, does input_datetime.quick_charge_time_start only contain time or also date?

input_datetime:
  quick_charge_time_start:
    name: Quick Charge Time Start
    icon: mdi:clock-start
    has_date: false # this stops the date portion 
    has_time: true

@jchh thank you for taking time to look at it.
Mysteriously, a HA restart fixed it. I have a feeling that I may have accidentally hit the trigger button when setting it up on the card and that the automation was running and waiting for a time that was probably hours away. So that when I tried to run the automation again it didn’t work because it was already running - and a restart killed the running instance so that it started working.