Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

Jinja supported in lovelace views?

$
0
0

@DessertBesom wrote:

Is it possible to use Jinja in Lovelace views? The goal is to have different picture urls, based on the sensor state. This one does not work.

    - type: picture
      image: >
        {% if is_state('binary_sensor.test', 'on') %}
          https://url-a.com/test.jpg
        {% else %}
          https://url-b.com/test.jpg
        {% endif %}

As a alternative, can I overwrite the url in a automation?

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>