I want to call a service when my condition is false.
I am trying to make 1 button that execute a script. The script need to turn on a group of lights. When i press the same button when the lights are on I want them to turn off. But they only need to turn of when they are the color temp set in the script. When they aren’t that color temp i want to change them to it using the script.
With if not is_state
I only can set a true or false. But i want to call a service when my lamp is on and an other service when it is not in the same script (Or within the same button)
like so
{% if is_state_attr(‘light.lamp_1’, ‘color_temp’, 439) %}
true (script 1)
{% else %}
false (script 2)
{% endif%}