I’m trying to use a script to only dimm lights that are on in a specific light group.
I use ControllerX to dim up and down with a Philips Hue dimmer.
script is called with:
up_short_release:
- service: script.light_dimmer_up
data:
lightgroup: group.dimmer_test
script:
light_dimmer_up:
description: increase light level when dim up button is pressed
sequence:
- service: light.turn_on
data_template:
entity_id: >
{{ expand( "{{ lightgroup }}" )| selectattr('state','eq','on') |
map(attribute='entity_id') | list | join(', ') }}
brightness_step_pct: 5
entity_id stays empty which results in the error: not a valid value for dictionary value @ data['entity_id']
probably my syntax for the nested "lightgroup" variable isn't correct.
I can’t get it right