Add picture attribute or extend icon to support image/GIF paths in new-style template entities #2047
-
Describe the enhancementWith the new template syntax (under template: key), binary sensors, sensors and other entities are defined using a structured YAML format. However, this new format lacks support for custom images or animated GIFs that was available in the old format via entity_picture_template Extend the icon attribute to accept local paths (/local/...) and URLs for images/GIFs, or Add a new picture attribute to the new template syntax that works like entity_picture_template did. Example usage#new format
template:
- binary_sensor:
name: “caldaia”
state: >
{{ is_state('switch.caldaia_switch1', 'on') }}"
icon: >-
{% if is_state('switch.caldaia_switch1', 'on') %}
/local/icon/caldaia_on.gif # ❌ NOT WORKING
{% else %}
/local/icon/caldaia_off.gif # ❌ NOT WORKING
{% endif %}Current workaroundsAnything else?No response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
It supports everything you're asking for. Please read the documentation before creating feature requests. Modern templates support everything legacy templates supported. |
Beta Was this translation helpful? Give feedback.
It supports everything you're asking for. Please read the documentation before creating feature requests.
Modern templates support everything legacy templates supported.