custom-cards / secondaryinfo-entity-row

Custom entity row for HomeAssistant, providing additional types of data to be displayed in the secondary info area of the Lovelace Entities card
172 stars 15 forks source link

Support for Jinja2 templates #31

Closed alryaz closed 3 years ago

alryaz commented 4 years ago

This adds support for Jinja2 templates API of card-tools, which utilizes Home Assistant backend for rendering.

busheezy commented 4 years ago

exactly what I wanted, thanks.

niemyjski commented 3 years ago

@iantrich can you please merge this.

iantrich commented 3 years ago

Has anyone tested to see if this still works?

alryaz commented 3 years ago

Has anyone tested to see if this still works?

I do still use this plug-in, so I can make a revision to ensure stuff works, and maybe call for HACS Default addition. Expect it by Sunday.

niemyjski commented 3 years ago

@iantrich I have tested it and confirmed it works. There are some template issues with this card that this definitely solves (the door is open):

image

  - entity: lock.front_door
    secondary_info: >-
      Door is [[ if(is_state("binary_sensor.front_door_open", "on"), "Open",
      "Closed") ]]
    type: 'custom:secondaryinfo-entity-row'
  - entity: lock.front_door
    secondary_info: >-
      Door is {% if is_state("binary_sensor.front_door_open", "on") %}Open{%
      else %}Closed{% endif %}
    type: 'custom:secondaryinfo-entity-row'
  - entity: lock.back_foyer_door
MizterB commented 3 years ago

Confirmed this still works, and has been rolled into release 5.0. Thank you!