hello community,
I have the following, this is in Packages code::
input_boolean:
nachtmodus:
name: Nachtmodus
template:
- binary_sensor:
- name: "Nachtmodus Icon"
state: "{{ is_state('input_boolean.nachtmodus', 'on') }}"
icon: >
{% if is_state('input_boolean.nachtmodus', 'on') %}
mdi:white-balance-sunny
{% else %}
mdi:weather-night
{% endif %}
which works
perfectly.
if I change it to this:
input_boolean:
nachtmodus:
name: Nachtmodus
template:
- binary_sensor:
- name: "Nachtmodus Icon"
state: "{{ is_state('input_boolean.nachtmodus', 'on') }}"
icon: >
{% if is_state('input_boolean.nachtmodus', 'on') %}
/local/custom_icons/zon1.svg
{% else %}
/local/custom_icons/maan1.svg
{% endif %}
I get this result. I don’t understand why. I have other things in the www folder and they all work perfectly. Can someone explain this to me? Thanks in advance

