Unable to set a device_tracker with entity_picture_template

I’m looking to change my device_tracker entity_picture based on a value.

In customize.yaml I can successfully set my entity_picture to a static value:

  entity_picture: "/local/profiles/my_pic.png"

However entity_picture**_template** results in lovelace reverting back to the icon (no entity_picture). Here’s my code.

  entity_picture_template: >-
    {% if is_state('sun.sun', 'above_horizon') %}
  {% else %}
  {% endif %}

entity_picture_template works on sensors, but I’m having difficulty with device_trackers.

1 Like