Setting up template in an automation problem

Hi, I’ve been going over my set-up for switching my lamps to the predefined profiles. I checked that my lights know these profiles. This is what I currently have:

- id: sfeer
  alias: 'Sfeer'
  trigger:
    - platform: state
      entity_id: input_select.light_profiles
  action:
    - service: light.turn_on
      data:
        entity_id: light.table,light.spots,light.standing
        data_template:
          profile: >
            {% if is_state("input_select.light_profiles", "relax") %}
              relax
            {%-elif is_state("input_select.light_profiles", "concentrate") %}
              concentrate
            {%-elif is_state("input_select.light_profiles", "energize") %}
              energize
            {%-elif is_state("input_select.light_profiles", "reading") %}
              reading
            {% else %}
              none
            {% endif %}

What I’m I doing wrong as it does not work?

Found what I was doing wrong, had to define the input_select it as string. Also managed to shorten the automation:

 - id: sfeer
      alias: 'Sfeer'
      trigger:
        - platform: state
          entity_id: input_select.light_profiles
      action:
        - service: light.turn_on
          data_template:
            entity_id: light.table,light.spots,light.standing
            profile: '{{ states.input_select.light_profiles.state | string }}'