How can I only dimm the lights, that are in the group light.wohnzimmer and are turned on.
service: light.turn_on
target:
entity_id:
- {{ expand('light.wohnzimmer') | selectattr('state','eq','on') | map(attribute='name') | list | join('\n- ') }}
data:
brightness_step_pct: -25