Trying to make a script which transitions through to light states. I’m trying to use fields but they are not properly evaluated, I get
Failed to call service script/scene_livingroom_movie. expected int for dictionary value @ data['brightness']
Script:
scene_livingroom_movie:
fields:
transition_time:
example: 2
brightness:
example: 1
color_temp:
example: 500
rgb_color:
example: "[255, 200, 145]"
sequence:
- service: light.turn_on
data_template:
entity_id: light.livingroom_lights
brightness: "{{ brightness }}"
transition: "{{ transition_time }}"
- delay:
seconds: "{{ transition_time }}"
- service: light.turn_on
data_template:
entity_id: light.livingroom_lights_xy
color_temp: "{{ color_temp }}"
transition: "{{ transition_time }}"
- service: light.turn_on
data_template:
entity_id: light.livingroom_lights_rgb
rgb_color: "{{ rgb_color }}"
transition: "{{ transition_time }}"
I tried with "{{ brightness | int }}"
as well but this also didn’t work. Not using the quotes gives me Error loading /config/configuration.yaml: invalid key: "OrderedDict([('brightness', None)])" in "/config/scripts.yaml", line 15, column 0