Need help with automation and template

Hi have an automation where i try to set rob value depending on selected value.

alias: Küche Untergrund Beleuchtung - Ändere Farb Profil
hide_entity: true
trigger:
  - platform: state
    entity_id: input_select.lightprofile_select
action:
  - service: input_boolean.turn_off
    entity_id: input_boolean.random_color
  - service: light.turn_on
    data_template: 
      entity_id: light.kitchen_underground_switch_level_25_0_2
      rgb_color: >
        {% if is_state("input_select.lightprofile_select", "Rot")  %}
          [255,0,0]
        {% elif is_state("input_select.lightprofile_select", "Grün")  %}
          [0,255,0]
        {% elif is_state("input_select.lightprofile_select", "Blau")  %}
          [0,0,255]
        {% elif is_state("input_select.lightprofile_select", "Warm")  %}
          [242,101,27]
        {% endif %}

There is no error when starting hass or checking the config files, also the input_boolean.random_color turn off is working. The only thing i can not get working here is setting the rgb_color by template.

btw: the automation works when i f remove the template thing and just write
rgb_color: [255,0,0]

What happens when you put this data_template in the template dev tool (button at bottom of sidebar in UI)?

Do you see a value?

Yes i get values.

Wait. Sorry. I forgot. rgb_value doesn’t yet support templates. Not sure if it’s on anyone’s roadmap - you could open an issue or a feature request post for that.

thats really bad, tempting i great but not really finished or thought to the end. :frowning: