Several custom sensors

Im new to home assistant and try my best to copy paste stuff

I successfully made ONE cusom sensor according to below code, namely Maxcurr1. It appers after restart and can be used. However my second sensor “Switchpos” does not appear after restart… so I guess there is a misstake in the synax that I cant see ?? Or Mayby I have missed out how to add several in a row…

template: 
    sensors:
      - name: "Maxcurr1"
        state: >
          {%set AA=states('sensor.current_l1') | float %}
          {%set BB=(20-AA)%}
          {%if BB>16 %} 
            160
          {% else %}
            {{(20-AA)*10 | int}}
          {% endif %}

      - name: "Switchpos"
        state: >
          {%set AA=states('sensor.current_l1') | float %}
          {%set BB=(20-AA)%}
          {%if BB<5.8 %} 
            2
          {% else %}
            3
          {% endif %}

It’s sensor: