When posting YAML code, please follow the instructions at the top of the page to properly format it. If you don’t, then it’s really difficult to read the code (as you can see from your post.)
Assuming you want to do this for all lights, then one way to do this is to use a state_changed event trigger for the automation with a condition that runs the action only if the domain is light.
If you only want to do this for a subset of your lights, then you could create a group (e.g., group.morning_lights) with the lights you care about, and then change the template condition to check that the entity whose state just changed is in that group.
- condition: template
value_template: >
{% set s = trigger.event.data.new_state %}
{{ s.domain == 'light' and s.state == 'on' and
'brightness' in s.attributes and s.attributes.brightness != 255 }}