Configuration validation not loading with custom light template

I dont know whats wrong with my template (im pretty new to ha)


as you can see in the screenshot the validation is just loading into eternity and never stops.

I also cant restart home assistant because of the following error:
" argument of type ‘NoneType’ is not iterable " .

This only takes place while i tried it with my custom teplate light i wanted to create. Can anyone tell me whats wrong with my template ligtht?

light:
  - platform: template
    lights:
      treppenlicht:
      friendly_name: "Treppenbeleuchtung"
      level_template: "{{ state_attr('input_boolean.treppenbeleuchtung_helligkeit')|int }}"
      value_template: "{{ states('input_boolean.treppenbeleuchtung_state') == 'on' }}"
      turn_on:
        service: button.press
        target:
          entity_id: button.treppenbeleuchtung_an
      turn_off:
        service: button.press
        target:
          entity_id: button.treppenbeleuchtung_aus
      set_level:
        - service: input_number.set_value
          data:
            value: "{{ brightness }}"
            entity_id: input_number.treppenbeleuchtung_helligkeit
        - service: button.press
          data_template:
            entity_id:
              - button.treppenbeleuchtung_an

The File Editor addon im using has the green tick so i dont know whats wrong!

The indentation is wrong. It has to be


      treppenlicht:
        friendly_name: Treppenbeleuchtung
        … and so on
        … and so on

Yeah it worked im unfirmiliar with yaml so i could understand the problem thanks for the help!