Automation to set LED strip color based on my house live solar production

Hey team!

was thinking of a neat way to provide visual feedback for any point in time as to my house’s energy consumption.

I have solar on the roof and most of daylight hours we are ‘energy positive’ (eg selling back to the grid). This is the graph I’ve made (green showing when we are selling back), but id love to have a LED strip reflect similar color gradients to give live feedback for the wife in the house (eg when is good time to turn dishwasher on etc)

anyone done anything like this ?
cheers
Keiran.

turns out it was rather easy, it works great, and more importantly the WAF (wife approval factor) is high - she loves it! Posting the flow here if anyone needs to stumble into this in the future:

Hi Keiran …Regards the WAF …I too am looking to get some visual feedback from generation and control a philips RGB led lamp.
Would you allow me the use of your code so I can try and make this happen.
Regards

sure @wootner mate. Nothing too clever, here we go:

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~SOLAR FEEDBACK LED
- alias: 'LIGHTING: Grid power feedback RED'
  trigger:
  - platform: numeric_state
    entity_id: sensor.grid
    # # If given, will trigger when the value of the given attribute for the given entity changes..
    # attribute: attribute_name
    # # ..or alternatively, will trigger when the value given by this evaluated template changes.
    # value_template: "{{ state.attributes.value - 5 }}"
    # At least one of the following required
    # above: 17
    above: 3001
  action:
    - service: light.turn_on
      data:
        entity_id: light.led_kitchen_left, light.tuya_led_bar
        rgb_color:            #RED 
          - 255
          - 0
          - 0    


- alias: 'LIGHTING: Grid power feedback BURNTORANGE'
  trigger:
  - platform: numeric_state
    entity_id: sensor.grid
    below: 3000
    above: 2001
  action:
    - service: light.turn_on
      data:
        entity_id: light.led_kitchen_left, light.tuya_led_bar
        rgb_color:            #BURNTORANGE
          - 255
          - 90
          - 0    


- alias: 'LIGHTING: Grid power feedback ORANGE'
  trigger:
  - platform: numeric_state
    entity_id: sensor.grid
    below: 2000
    above: 1001
  action:
    - service: light.turn_on
      data:
        entity_id: light.led_kitchen_left, light.tuya_led_bar
        rgb_color:            #ORANGE 
          - 255
          - 185
          - 0    


- alias: 'LIGHTING: Grid power feedback YELLOW'
  trigger:
  - platform: numeric_state
    entity_id: sensor.grid
    below: 1000
    above: 1
  action:
    - service: light.turn_on
      data:
        entity_id: light.led_kitchen_left, light.tuya_led_bar
        rgb_color:            #YELLOW 
          - 255
          - 255
          - 0    


- alias: 'LIGHTING: Grid power feedback GREEN'
  trigger:
  - platform: numeric_state
    entity_id: sensor.grid
    below: 0
    above: -999
  action:
    - service: light.turn_on
      data:
        entity_id: light.led_kitchen_left, light.tuya_led_bar
        rgb_color:            #GREEN 
          - 0
          - 255
          - 0    


- alias: 'LIGHTING: Grid power feedback BLUE'
  trigger:
  - platform: numeric_state
    entity_id: sensor.grid
    below: -1000
  action:
    - service: light.turn_on
      data:
        entity_id: light.led_kitchen_left, light.tuya_led_bar
        rgb_color:            #GREEN 
          - 0
          - 0
          - 255

Hay I lik ewhat you have done here but I have no idea how to implement that, is it possible to step by step that