Template Light - RGB

Here’s a simple template light that defines rgb_template (Template Light - Home Assistant) statically for testing purposes. I expected that rgb_template would dictate the color of the light in the frontend. However, the light is only default yellow. Shouldn’t it be blue as per the template?

light:
  - platform: template
    lights:
      scene_light_entry_unsecured:
        friendly_name: Scene Light - Entry Unsecured
        unique_id: scene_light_entry_unsecured
        rgb_template: "{{ [0, 0, 255] }}"  # Blue
        turn_on:
          - service: light.turn_on
            target:
              entity_id: light.scene_lights
        turn_off:
          - service: light.turn_off
            target:
              entity_id: light.scene_lights

Hi odwide,

Scenes not properly saving color state.

Thanks, Sir_Goodenough. Testing different variations of the template finally got it working. The key is to define set_rgb:

light:
  - platform: template
    lights:
      scene_light_entry_unsecured:
        friendly_name: Scene Light - Entry Unsecured
        unique_id: scene_light_entry_unsecured
        set_rgb:
          - event: event_light_state_changed
            event_data:
              rgb: "{{ rgb }}"
        turn_on:
          - service: light.turn_on
            target:
              entity_id: light.scene_lights
        turn_off:
          - service: light.turn_off
            target:
              entity_id: light.scene_lights