custom-cards / flex-table-card

Highly Flexible Lovelace Card - arbitrary contents/columns/rows, regex matched, perfect to show appdaemon created content and anything breaking out of the entity_id + attributes concept
GNU General Public License v3.0
198 stars 23 forks source link

How to display icon as a column value? #60

Closed Tom-ahawk closed 2 years ago

Tom-ahawk commented 2 years ago

image

I can’t figure it out. Please help.

Cheers.

valleedelisle commented 2 years ago

This worked for me:

  - data: icon
    name: Trend
    modify: |
      '<ha-icon icon="' + x + '"/>'
Tom-ahawk commented 2 years ago

The latest update made this icon code going wrong. Now I see only "/> instead of the icon. Please advise.

daringer commented 2 years ago

please try without the modify statement, just use icon as data and you should be fine see: https://github.com/custom-cards/flex-table-card/blob/d352468ff1eea8f467e04b9c65a236575c20968a/flex-table-card.js#L257