Energy Price on LED strip - need help with WLED segment automation and loop

Hi,
my energy provider AMBER here in Australia provides a price forecast and the AMBER integration makes that available as a sensor in HA.

On their app they show it like this:

Now I want to replicate that same display on a LED strip. I would install the strip in the laundry to remind us to start the machine now or delay a bit.

I am thinking of using WLED and splitting the strip into segments. Then each segment becomes its own light in HA. The only thing I need to do now is set all the colors correctly with an automation.

I have all the code to find the light and the relevant color, but how do I set all the lights differently in one automation?

my code so far:

{% 
  set forecast=state_attr('sensor.homeambermeter_general_forecast', 'forecasts') | map(attribute='descriptor')|list
%}
{% 
  set color_map={'spike': 'purple', 
              'high': 'red', 
              'neutral': 'darkorange',
              'low': 'orange',
              'very_low': 'green',
              'extremely_low': 'cyan'
} %}

{% 
  set lightsegments= [
     'light.amberlight',
     'light.amberlight_segment_1',
     'light.amberlight_segment_2',
     'light.amberlight_segment_3'] 
%}

{% for segment in lightsegments %}
{{loop.index0}} light entity: {{ state_attr( segment , "friendly_name" ) }} 
  price {{ forecast[loop.index0] }}
  color {{ color_map[forecast[loop.index0]]}}.
{% endfor %}

that generates this output:

0 light entity: AmberLight 
  price low
  color orange.

1 light entity: AmberLight Segment 1 
  price high
  color red.

2 light entity: AmberLight Segment 2 
  price high
  color red.

3 light entity: AmberLight Segment 3 
  price high
  color red.

So I have all the details I need, how do I write the action in the automation?
This example only uses 4 segments, I am hoping to use at least 12 segments to cover the next 6 hrs.

any pointers would be appreciated

this is the automation with 6 segments all typed out.
Would be great if it could be done in a loop.

alias: update amber light
id: update_amber_light
initial_state: 'on'

variables: 
  forecast: "{{state_attr('sensor.homeambermeter_general_forecast', 'forecasts') | map(attribute='descriptor')|list}}"
  color_map: {'spike': 'purple', 
              'high': 'red', 
              'neutral': 'darkorange',
              'low': 'orange',
              'very_low': 'green',
              'extremely_low': 'cyan'}
  lightsegments: [
     'light.amberlight',
     'light.amberlight_segment_1',
     'light.amberlight_segment_2',
     'light.amberlight_segment_3',
     'light.amberlight_segment_4',
     'light.amberlight_segment_5'
     ]

trigger:
  - platform: state
    entity_id: binary_sensor.laundry_motion
    to: 'on'
action:
  - service: homeassistant.turn_on
    data:
      entity_id: light.amberlight_master
      brightness: 128

  #set individual segments
  # CAN THIS BE DONE IN A LOOP ???    
  - service:  homeassistant.turn_on
    data:
      entity_id: "{{lightsegments[0]}}"  
      color_name: "{{ color_map[ forecast[0] ] }}" 

  - service:  homeassistant.turn_on
    data:
      entity_id: "{{lightsegments[1]}}"  
      color_name: "{{ color_map[forecast[1]] }}"

  - service:  homeassistant.turn_on
    data:
      entity_id: "{{lightsegments[2]}}"  
      color_name: "{{ color_map[forecast[2]] }}"

  - service:  homeassistant.turn_on
    data:
      entity_id: "{{lightsegments[3]}}"  
      color_name: "{{ color_map[ forecast[3] ] }}"

  - service:  homeassistant.turn_on
    data:
      entity_id: "{{lightsegments[4]}}"  
      color_name: "{{ color_map[ forecast[4] ] }}"

  - service:  homeassistant.turn_on
    data:
      entity_id: "{{lightsegments[5]}}"  
      color_name: "{{ color_map[ forecast[5] ] }}"

##  "{% for segment in lightsegments -%}" 
##  - service : homeassistant.turn_on
##    data:
##      entity_id: "{{lightsegments[loop.index0]}}" 
##      color_name: "{{ color_map[ forecast[loop.index0] ] }}"
##  "{%- endfor %}"