Skip to content

Icon color always black - customize ignored #193

Description

@Masterz69

See icons in table in black color, while it colored in entity card:

Image Image
          - type: 'custom:flex-table-card'
            clickable: true
            entities:
              include:
                - sensor.*_battery_level
            sort_by: friendly_name
            columns:
              - data: icon
                name: ''
              - data: friendly_name
                name: Name
                modify: '(x+"").replace(/ battery level$/i,"")'
              - data: state
                name: "Charge"
                fmt: number
                align: right
                suffix: ' %'
              - data: last_updated
                name: "in Min."
                align: right
                modify: Math.round((Date.now() - Date.parse(x)) / 600. / 100. )

In my case icon colors customized as follow:

  customize_glob:

    sensor.*_battery_level:
      templates: &battery_color
        icon_color: >
          if (state > 75) return 'green';
          if (state > 50) return 'gold';
          if (state > 25) return 'orange';
          if (state > 10) return 'brown';
          return 'red';

Functionality provided by custom-ui.

So far any part of HA UI using this customization (even bult-in entity properties card), but colors not show in flex-table-card.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions