I can't see where this script is wrong

I’ve tried editing this script a heap of times and can’t understand why it won’t load…

script:
  daves_bedside_lamp_transition_off:
    alias: Daves Bedside Lamp Transition Off
    sequence:
      - condition: state
        entity_id: light.daves_bedside_lamp
        state: 'on'
      - alias: "repeat the dim down of daves lamp"
        repeat:
          sequence:
            - service: light.turn_on
              data:
                entity_id: light.daves_bedside_lamp
                brightness_step_pct: -1
            - delay: "00:00:10"
        until:
          - condition: numeric_state
            entity_id: light.daves_bedside_lamp
            attribute: brightness
            below: 1
      - service: light.turn_off
        data:
          entity_id:
            - light.daves_bedside_lamp

errors:

* Script with alias 'Daves Bedside Lamp Transition Off' could not be validated and has been disabled: expected a dictionary for dictionary value @ data['sequence'][0]['repeat']. Got None extra keys not allowed @ data['sequence'][0]['sequence']. Got [{'service': 'light.turn_on', 'data': {'entity_id': 'light.daves_bedside_lamp', 'brightness_step_pct': -1}}, {'delay': '00:00:10'}] extra keys not allowed @ data['sequence'][0]['until']. Got [{'condition': 'numeric_state', 'entity_id': 'light.daves_bedside_lamp', 'attribute': 'brightness', 'below': 1}]

* Script with alias 'Daves Bedside Lamp Transition Off' could not be validated and has been disabled: extra keys not allowed @ data['sequence'][0]['until']. Got [{'condition': 'numeric_state', 'entity_id': 'light.daves_bedside_lamp', 'attribute': 'brightness', 'below': 1}] must contain at least one of count, for_each, while, until. for dictionary value @ data['sequence'][0]['repeat']. Got {'sequence': [{'service': 'light.turn_on', 'data': {'entity_id': 'light.daves_bedside_lamp', 'brightness_step_pct': -1}}, {'delay': '00:00:10'}]}

* Script with alias 'Daves Bedside Lamp Transition Off' could not be validated and has been disabled: extra keys not allowed @ data['sequence'][1]['until']. Got [{'condition': 'numeric_state', 'entity_id': 'light.daves_bedside_lamp', 'attribute': 'brightness', 'below': 1}] must contain at least one of count, for_each, while, until. for dictionary value @ data['sequence'][1]['repeat']. Got {'sequence': [{'service': 'light.turn_on', 'data': {'entity_id': 'light.daves_bedside_lamp', 'brightness_step_pct': -1}}, {'delay': '00:00:10'}]}

Can we not have a repeat loop sequence inside a another sequence, so there are other services to be executed after the loop? Or have I just written this wrong… (most likely!)

Your until stanza needs to be indented one more time.

Thank you! I think my frustration was clouding my ability to see the mistake.