Lovelace: Multiple entity row

Is there a way to NEST ‘custom:multiple-entity-row’ within ‘custom:fold-entity-row’ using identical ‘head:’?

This looks great!
How do you install it?

Searching for multiple-entity-row in hacs returns empty…

Running HA v0.112.4
hacs v1.2.2

Thanks

You’re searching in your installed repositories.
Click the plus sign at the right bottom to install new.

2 Likes

Doh, of course :slight_smile:.
Thanks!

Hi, I have following 3 conditional multiple entity rows in one type: entities
timer

lovelace config:

      - type: entities
        style: |
                ha-card {
                  font-variant: small-caps;
                  padding: 0px 15px;
                } 
        entities:
        - type: custom:hui-element
          card_type: conditional
          conditions:
           - entity: input_boolean.cycle1_on
             state: "on"
          card:
            type: entities
            style: |
                ha-card {
                  background: none;
                  font-variant: small-caps;
                  padding: 0px 15px;
                }  
            entities:
            - entity: sensor.timer_1_mb_end
              type: custom:multiple-entity-row
              name: Timer 1
              state_header: Konec
              show_state: true
              icon: mdi:clock-digital
              entities:
              - entity: sensor.timer_1_mb
                name: Start
.
.
.

Is there any way how to minimize empty space above and below the text to make the box more narrow?

Could someone please post an example of the full code how to combine custom:multiple-entity-row combined with custom:fold-entiy-row like kleju00 did in this screenshot ?

Unfortunately the code in his screenshot is incomplete and i’ve been trying to get it to work for a few days now but no success :frowning:

Hello friends, I am trying to add several multiple row cards, on the computer and mobile phone they look good, but on the tablet they are cut, any solution to this?

Example code:

type: entities
show_header_toggle: false
entities:

  • entity: switch.enchufe_cocina_frigorifico
    icon: ‘mdi:fridge-bottom’
    type: ‘custom:multiple-entity-row’
    name: Frigorifico
    toggle: true
    state_color: true
    entities:
    • entity: sensor.potencia_frigorifico
      name: Power
    • entity: sensor.energia_total_frigorifico
      name: Total
  • type: section
  • entity: switch.enchufe_cocina_micro
    icon: ‘mdi:microwave’
    type: ‘custom:multiple-entity-row’
    name: Microondas
    toggle: true
    state_color: true
    entities:
    • entity: sensor.potencia_enchufe_micro
      name: Power
    • entity: sensor.energia_total_enchufe_micro
      name: Total

View in Pc is correct:

1 Like

Could you add that to the instructions in GitHub for us simpletons :grinning:.

1 Like

How you guys achieved so good looking spacing between header and value/toggle?
Mine looks like this:

Is it possible to render label on the left side of the toggle?

Tertiary? :slight_smile:

First, let me thank the Developer for such a great job, the card is incredible!

Found some issue which is not clear for me.
Create the card:

type: entities
entities:
  - type: section
    label: "No icon property specified"
  - type: 'custom:multiple-entity-row'
    entity: sun.sun
    entities:
      - entity: sun.sun
  - type: section
    label: "icon: true"
  - type: 'custom:multiple-entity-row'
    entity: sun.sun
    entities:
      - entity: sun.sun
        icon: true
  - type: section
    label: "icon: false"
  - type: 'custom:multiple-entity-row'
    entity: sun.sun
    entities:
      - entity: sun.sun
        icon: false
  - type: section
    label: "icon: another icon"
  - type: 'custom:multiple-entity-row'
    entity: sun.sun
    entities:
      - entity: sun.sun
        icon: mdi:car

The card:

According to a description from GitHub:

icon lets you display an icon instead of a state or attribute value

and default value is false.
And because of the default value if ‘icon: false’ then a VALUE is supposed to be displayed instead of the icon.
Currently there is only one way to display a VALUE - not specifying the icon property at all.
I think there is some confusion here.

Not sure if you already figured this out. But I did some trial and error and got it working. Below is an example of my code:

type: entities
entities:
  - type: 'custom:fold-entity-row'
    head:
      entity: input_select.home_mode
      type: 'custom:multiple-entity-row'        
      name: false
      state_header: Home Mode
      entities:
        - entity: input_select.family          
        - entity: input_select.home_state
    entities:
      - input_boolean.guest_mode
      - input_boolean.vacation_mode

And it ends up looking like this, which is similar to what I think you are asking about.

image

5 Likes

Thanks very much :slight_smile:

Never figured it out and put the idea away thinking it would not work.
Very glad you posted the code and got it working

@benct Many thanks for this great card!!

UPDATE: found the solution

Anyone tried the new format: options?

Do you have an example for me (newbee) how to use it. I like to use the precision option to round the value of an attribute. Hopefully it supports that.

Found a solution…

  - entity: media_player.werkplek_hub
    type: 'custom:multiple-entity-row'
    name: Media Player
    show_state: false
    entities:
      - attribute: volume_level
        name: Volume
        format: 'precision2'
      - attribute: friendly_name
        name: Name

1 Like

Is it possible to add differnt font colors for different states of the sensor being tracked?

Thanks for a great control, really decluttered my screen.

Has anyone found the styling to change individual state text colours in the row? I’ve tried with style for hours and nothing, hoping someone has figured it out?

I saw earlier in the thread someone mentioning it doesn’t work for an individual entity. Hoping someone made some progress?

With card-mod you can.

Example (there could be other options):

  - type: section
  - entity: air_quality.xiaomi_airmonitor_2
    type: 'custom:multiple-entity-row'
    name: Air Quality
    styles:
      color: var(--my-font03-color)
    entities:
      - attribute: carbon_dioxide_equivalent
        name: CO2
        styles:
          color: var(--my-font01-color)
      - attribute: total_volatile_organic_compounds
        name: TVOC
        styles:
          color: var(--my-font02-color)
        format: precision2
style: |
  ha-card {
    --my-font01-color: {% if state_attr('air_quality.xiaomi_airmonitor_2', 'carbon_dioxide_equivalent')|int < 1000 %} green {% else %} orangered {% endif %};
    --my-font02-color: {% if state_attr('air_quality.xiaomi_airmonitor_2', 'total_volatile_organic_compounds')|int < 1 %} lightblue {% else %} orangered {% endif %};
    --my-font03-color: {% if state_attr('air_quality.xiaomi_airmonitor_2', 'particulate_matter_2_5')|int < 100 %} green {% else %} orangered {% endif %}
   }   

8 Likes

:sob: :sob: :sob: :scream:
How did I not see the styles property. I bow my head in shame. :flushed:

Thank you!

Thx a million.

I managed to get it working but i have one example that wont work, and i propably have the syntax wrong

I want to compare 2 sensor values and depending on that get the color changed

ha-card {
    --my-font04-color: {% if is_state('sensor.latest_version' == 'is_state('sensor.current_version')' %} green {% else %} orangered {% endif %};
  }  

Try this:

  --my-font04-color: {% if states('sensor.latest_version') == states('sensor.current_version') %} green {% else %} orangered {% endif %};
2 Likes