#Change row color

1 messages · Page 1 of 1 (latest)

leaden lynx
#

I have this table to display the battery level of all my battery powered zigbee devices: ```yaml
views:

  • title: Batteri
    type: panel
    cards:
    • type: custom:auto-entities
      card:
      type: custom:flex-table-card
      clickable: true
      sort_by:
      - state
      columns:
      - name: Device
      data: friendly_name
      - name: Battery %
      data: state
      strict: true
      filter:
      include:
      - domain: sensor
      attributes:
      device_class: battery
      exclude:
      - integration: mobile_app

Is it possible to specify different colors for the rows of different battery levels? e.g. <30% = marked red <50% marked yellow?
tough harbor
#

you might want to look at battery-state-card - it's really nice for this kind of thing

lilac cedar
#

I believe it is possible but the explanations I found on line were WAY too hard. So I solved the problem with a markdown card. In my example, I changed text colour instead of bar colour, but the process is much the same if you know your HTML