Repeat automation only running one time

I am trying to make one automation run until the sun rises which is triggered by the sun’s dawn. The problem is that when the sun dawn, the repeat only runs one time even if the time is lower than the sun rising.

choose:
  - conditions:
      - condition: trigger
        id: dawn
    sequence:
      - repeat:
          until:
            - condition: time
              before: input_datetime.sun_rising
          sequence:
            - service: input_number.set_value
              data:
                value: >-
                  {{ 2300/(state_attr("input_datetime.sun_rising", "timestamp")
                  - state_attr("input_datetime.sun_dawn", "timestamp")) *
                  as_timestamp(now()) + (2200 -
                  (2300/(state_attr("input_datetime.sun_rising", "timestamp") -
                  state_attr("input_datetime.sun_dawn", "timestamp"))) *
                  state_attr("input_datetime.sun_dawn", "timestamp")) }}
              target:
                entity_id: input_number.light_temperature
  - conditions:
      - condition: trigger
        id: rising
    sequence:
      - service: input_number.set_value
        data:
          value: 4504
        target:
          entity_id: input_number.light_temperature

What do I need to do to make my automation run until hits the sun’s rising time? What am I making wrong?

I think the issue is the use of a trigger.
A trigger only activates when the value it checks against is actually changed according to the trigger conditions.
This means a switch from day to night will trigger a a trigger set to night, but a night to night will not.

It would help if you could post a trace of your automation, so we can see what values it’s using.

maybe you want to change the mode

and i think you need a trigger. see some examples below

  - alias: Nice name for automation 
    initial_state: 'on'
    mode: single  ## <-- change this one
    trigger:
    - platform: sun
      event: sunrise
      offset: +01:00:00
    - platform: time
      at: '12:00:00'
    condition:
      condition: and
      conditions:
        - condition: state
          entity_id: input_boolean.something
          state: 'on'
        - condition: state
          entity_id: input_boolean.something2
          state: 'on'  
    action:
      ##your action