Only trigger group members that need to be triggered

As of version 0.96, you can use the expand function to streamline your template:

    - service: light.turn_on
      data_template:
        entity_id: "{{expand('group.colortemplights') | selectattr('state', 'equalto', 'on') | map(attribute='entity_id') | join(', ')}}"
        color_temp: 300
        transition: 3

I recall suggesting it to someone who wanted to dim lights that are on: