I have been using this automation prior to 0.60 and they’ve been working. I couldn’t turn toggle two entities (last condition, else). I’ve tried using two lines with hyphen, and putting space after the comma but it wouldn’t work.
I’ve verified nothing is wrong on my config by using services development tool, jinja dev tool as well as removing one entity id.
action:
- service: homeassistant.toggle
# entity_id: light.garage
data_template:
entity_id: >
{% if is_state("light.frontgate", "off") and is_state("light.garage", "off") and is_state("light.garage2", "off") %}
light.frontgate
{% elif is_state("light.frontgate", "on") and is_state("light.garage", "off") and is_state("light.garage2", "off") %}
light.garage
{% elif is_state("light.frontgate", "on") and is_state("light.garage", "on") and is_state("light.garage2", "off") %}
light.garage2
{% elif is_state("light.frontgate", "on") and is_state("light.garage", "on") and is_state("light.garage2", "on") %}
light.frontgate
{% elif is_state("light.frontgate", "off") and is_state("light.garage", "on") and is_state("light.garage2", "on") %}
light.garage
{% else %}
light.garage2
{% endif %}
You need to verify that the if lines exclusively report true. I mean if for some reason 2 of the “condition lines” report true at the same time, neither entity_id gets through.
Check all lines in dev_tools to see only one turns true at a given time.