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
208 stars 26 forks source link

Attribute icon not work #98

Closed zanac closed 1 year ago

zanac commented 1 year ago

I have a sensor with custom attributes - "data"

It seems that "icon" cannot be used in flex-table-card, if i put it in colum the "modify" don't work:

ildar170975 commented 1 year ago

Check this:

type: custom:flex-table-card
entities:
  include:
    - sun.sun
    - fan.xiaomi_mijia_300_1
    - lock.virtual_front_door_lock
    - media_player.kodi_rpi_1
    - sensor.xiaomi_cg_1
    - sensor.xiaomi_cg_1_co2
    - binary_sensor.iphone_5s_focus
    - input_number.test_number
    - input_boolean.test_boolean
    - input_select.test_value
    - input_text.test_text
columns:
  - name: name
    data: name
  - name: entity_id
    data: entity_id
  - name: state
    data: state
  - name: icon
    data: icon

Which gives this: image

Note that icons are displayed only when: -- defined explicitly in template sensors -- customized via customize -- ... probably some other cases

Also have a look at this: image The icon for sun.sun CANNOT be accessed. No idea why there is such a limitation. https://github.com/home-assistant/architecture/discussions/931