Customizing a Lovelace Card

Did you install HACS and then install this via HACS or did you download it and install it manually?

show_name: true
show_icon: true
show_state: true
type: glance
entities:
  - entity: sun.sun
    name: kitchen
  - entity: sun.sun
    name: bedroom
  - entity: sun.sun
    name: hall
  - entity: sun.sun
    name: ''
  - entity: sun.sun
    name: ''
  - entity: sun.sun
    name: ''
  - entity: sun.sun
    name: ''
  - entity: sun.sun
    name: ''
  - entity: sun.sun
    name: ''
columns: 3

изображение
1 row = blinds
2 row = batteries
3 row = wifi

type: entities
entities:
  - type: custom: m-e-r
    entity: ...
    ... and so on
type: entities
entities:
  - type: custom:multiple-entity-row
    entity: sun.sun #could be anything
    name: kitchen
    show_state: false
    tap_action: none
    entities:
      - entity: cover.test_garage_door
        name: false
      - entity: cover.test_garage_door
        icon: true
        name: false

1st “-” adds a state, 2nd adds an icon.
Repeat these “-” lines for “battery” & “wifi”.
изображение

Add this “- type: custom:multiple-entity-row” code for every room.

This is exactly what i was looking for.
I had a feeling it was a YAML code edit i needed to make

image

I appreciate all the feedback and support.
I will continue to play around with Multiple Entities Rows because i do actually like the layout a bit better
@CO_4X4 image is what i will most likely end up going for

I just went to HACS and donwloaded it
I see the resource in my dashboard.
I figured thats all i needed?

Just test the code:

type: entities
entities:
  - type: custom:multiple-entity-row
    entity: sun.sun

yup
Code seems to be working

I will continue with your example above and see if i can get it to look like
@CO_4X4 screen shot

Thanks again

Thanks again for all the help

Here is what i got so far (ignore the unavailable blind, not sure why it keeps dropping)

Looks like i finally understand the code - but i am not understanding how the battery color icons work
When i find the mdi: icon it only has 10% - 20% etc…
there doesnt seem to be a dynamic icon that changes when the state changes…

Any ideas?

image

ok - i got the colors :slight_smile:
But the battery icon isnt changing
whats the parameter for that??

image

Looking good everyone thanks again…

image

Still just those battery icons arnt changing state and how did @CO_4X4 get that the “state” name over the “Closed” state for the blinds…

Sorry, have you tried reading docs for m-e-r?
It is “name” option.

1 Like

Yes i did find the state_header
In the documentation example it seems there are a few things different on where these parameter are placed.
I had the state_header in the wrong spot…

image

One thing left is to get these Battery icons to change dynamically with the state…

is a “title” (displayed above a state) for the main entity, for additional entities use “name”

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