Here’s something you may wish to try. It combines the efficiency of a State Trigger with the convenience of a Group. It’s untested with lights so caveat emptor.
Create a State-based Template Sensor that reports the latest light that just turned on. Replace group.my_lights with whatever is the entity_id of your group of lights.
template:
- sensor:
- name: Latest Light On
state: >
{% set x = expand('group.my_lights') | selectattr('state', 'eq', 'on') | sort(attribute='last_changed', reverse=true) | list %}
{{ (x[0].entity_id if now() - x[0].last_changed < timedelta(seconds=3) else '') if x | count > 0 else '' }}
Create an automation with a State Trigger that monitors the sensor.
alias: 'TEST: Tell which light bulbs turned on'
description: ''
trigger:
- platform: state
entity_id: sensor.latest_light_on
condition:
- condition: template
value_template: "{{ trigger.to_state.state != '' }}"
action:
- variables:
is_above: '{{ is_state("sun.sun", "above_horizon") }}'
- service: light.turn_on
target:
entity_id: '{{ trigger.to_state.state }}'
data:
brightness_pct: 1
color_temp: '{{ 300 if is_above else 425 }}'
- delay: '00:00:01'
- service: light.turn_on
target:
entity_id: '{{ trigger.to_state.state }}'
data:
transition: 10
brightness_pct: '{{ 100 if is_above else 50 }}'
- service: notify.notify
data:
message: 'This light was turned on: {{ trigger.to_state.state }}'
mode: parallel
max: 10
As already stated, this is untested with lights so let me know if it works (or not).