Edit: In case anyone else runs into this problem, this is what works:
g_bright_mode:
sequence:
- service: light.turn_on
data_template:
entity_id: '{{ input_light }}'
brightness: 255
color_temp: 226
- alias: Lamp Bright
trigger:
- platform: state
entity_id: input_select.lamp_mode
to: "Bright"
action:
- service: script.g_bright_mode
data:
input_light: 'light.lamp'
Hi,
I’m very new to home assistant and need help understanding why this isn’t working.
I have this script:
g_bright_mode:
sequence:
- service: light.turn_on
data:
brightness: 255
color_temp: 226
and this automation:
- alias: Lamp Bright
trigger:
- platform: state
entity_id: input_select.lamp_mode
to: "Bright"
action:
- service: script.g_bright_mode
entity_id: light.lamp
I was hoping to set up multiple automations to set lights to bright mode (or other modes) individually. But the script always calls all lights, not just the one specified in the automation. I also tried:
- alias: Lamp Bright
trigger:
- platform: state
entity_id: input_select.lamp_mode
to: "Bright"
action:
- service: script.g_bright_mode
data:
entity_id: light.lamp
Still didn’t work.
Is this a limitation of light.turn_on? Does the script have to have the entity_id of a specific light to make it work? Will I need to make a “Bright” script for each light instead?