Customizing a Lovelace Card

yes, exactly
I use “name” for the entity name and state_header for the state

Thank again
You really helped me

Could you post your code? I’m looking for icons color solution. In my case it would be window opened/closed for climate control.

Check out this thread

I’m looking for conditional formatting. I know I can do template but I use it with auto-entities so I cannot hardcode the condition. I needs to check value of the entity attribute (climate entity and window_state attribute). For now I use standard hide function but would like to know how to color icon:
image

type: custom:multiple-entity-row
entity: this.entity_id
toggle: true
secondary_info:
  attribute: last-changed
entities:
  - attribute: window_state
    icon: mdi:window-closed-variant
    state_color: true
    hide_if: "off"
    hide_unavailable: true
  - attribute: on_percent
    name: Moc
    unit: "%"
    hide_unavailable: true

To control the icon color I believe you’ll need to use the multiple-entity-row inside a entities card

type: entities
entities:
  - type: custom:multiple-entity-row
    entity: cover.bed_curtains
    toggle: true
    secondary_info:
      attribute: last-changed
    card_mod:
      style:
       hui-generic-entity-row:
        $: |
          state-badge {
            color: orange;
          }
        .: |
          div.entity:nth-child(1) state-badge {
            color: green;
          }
    entities:
      - attribute: current_position
        icon: mdi:window-closed-variant
        state_color: true
        hide_if: '2'
        hide_unavailable: false

Step by step:
1.Learn how to customize multiple-entity-row w/o conditions. A good link to a tutorial was attached above.
2.Next - add conditions into working styles.
All these questions are better to ask in a dedicated card-mod thread. No need to create your OWN separate topic.

3.Next - do it in auto-entities card. Better to ask here. There are examples there for multiple-entity-row.

1 Like