Well, I am unsure because I think my problem is in the script part, but you might be right.
My script is:
script:
boiler_on:
alias: 'Boiler On'
icon: mdi:code-block-tags
sequence:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id:
- switch.boiler_1
- switch.boiler_2
- switch.boiler_3
and my template to change the icon is
template:
- binary_sensor:
- name: "boiler_all_on"
state: >
{{ is_state('switch.boiler_1', 'on')
and is_state('switch.boiler_2', 'on')
and is_state('switch.boiler_3', 'on') }}
icon: >
{% if is_state('switch.boiler_1', 'on')
and is_state('switch.boiler_2', 'on')
and is_state('switch.boiler_3', 'on') %}
mdi:fire
{% else %}
mdi:code-block-tags
{% endif %}
So for me the question is whether or not I can change the icon in the script based on that template binary sensor.
If I am wrong here, shall I ask an admin to move my question or should I copy it over?