Script: Template returns None

I also tried the solutions from this post: Help with RGB light automation

First one, with a list in yaml-format:

sofa_group_set_rgb:
  alias: Sofa_Group_Set_RGB
  sequence:
  - service: light.turn_on
    data:
      rgb_color: >
        {% set var1 = (states('input_text.sofa_group_status') | replace('[','') | replace(']','') | replace(' ','')) %}
        {% set list1 = var1.split(',') %}
        - {{ list1[0] | int }}
        - {{ list1[1] | int }}
        - {{ list1[2] | int }}
    entity_id: light.sofa_group
  mode: single

Second one, with passing a list (This one does not work at all, it says some formatting errors):

sofa_group_set_rgb:
  alias: Sofa_Group_Set_RGB
  sequence:
  - service: light.turn_on
    data:
      rgb_color: >
        {% set var1 = (states('input_text.sofa_group_status') | replace('[','') | replace(']','') | replace(' ','')) %}
        {% set list1 = var1.split(',') %}
          ['{{list1[0] | int }}',
	      '{{list1[1] | int }}',
	      '{{list1[2] | int }}']
    entity_id: light.sofa_group
  mode: single