Template sensors and pictures

Is it possible to use pictures instead of icons for template sensors?

I have a template_sensor based on a device_tracker which itself has a picture defined but when using the template_sensor in Lovelace it just displays the icon.

  - platform: template
    sensors:
     current_address:
        friendly_name: Current address
        value_template: >
          {% set address = state_attr('device_tracker.life360_me', 'address') %}
          {% set since_day = as_timestamp(state_attr('device_tracker.life360_me', 'at_loc_since')) | timestamp_custom('%A') %}
          {% set since_time = as_timestamp(state_attr('device_tracker.life360_me', 'at_loc_since')) | timestamp_custom('%H:%M') %}

          {% if state_attr('device_tracker.life360_me', 'address') != None %}
            {{ address }}. (Since {{ since_time }} on {{ since_day }}) 
          {% else %}
            {{ states('device_tracker.life360_me').title() }}. (Since {{ since_time }} on {{ since_day }})
          {% endif %}

According to the docs there is an optional entity_picture_template config parameter available that might do what you want.

1 Like