I’m having trouble setting the color_temp of a light. Since you are unable to set the color & color_temp at the same time, I’d like to set one or the other based on a variable. For example, something like:
action:
- service_template: light.turn_on
data:
entity_id: '{{ trigger.event.data["name"] }}'
{% if trigger.event.data["color"] == 'softwhite' }
color_temp: 350
{% else %}
color_name: '{{ trigger.event.data["color"] }}'
{% endif %}
Any insight would be greatly appreciated! Thanks