šŸ”¹ fold-entity-row - Hide away stuff in entities cards

Trying to do something pretty simple but having a hard time. Itā€™s really a use of fold-entity-row and auto-entities. Iā€™m simply trying to show all of my rooms/groups fold-able but only display switches/lights that are on.

None of these attempts seem to workā€¦ would appreciate any hints. It seems logical to break down foldable rooms and only show entities of a specific state. TIA!

card:
  show_header_toggle: false
  title: TEST Currently On
  type: entities
filter:
  exclude:
    - state: 'off'
  include:
    - domain: group
      options:
        open: true
        type: 'custom:fold-entity-row'
      state: 'on'
show_empty: false
type: 'custom:auto-entities'

Another failure:

type: entities
title: Test
entities:
  - type: 'custom:fold-entity-row'
    head: group.office
    open: true
  - type: 'custom:fold-entity-row'
    head: group.hallway
    open: true

How donā€™t they work?

Thanks for responding @thomasloven ā€” the biggest problem is that Iā€™m not able to filter CHILD items. Meaning Iā€™m able to show all of my groups but when I filter for ON state it filters on the group not the children. The goal is to show each group and ONLY child items that are in the ON state. See the below result from my top example and notice that it contains entities that are in the OFF state:

Iā€™m trying to reduce the space between entities on the fold-entity-row but canā€™t seem to find the right combination. Any suggestions? Thanks

type: vertical-stack
cards:
  - type: entities
    title: User Setup - HA RESTARTS when changed
    style: |
      .card-header {
        font-size: 1.5em;
        font-weight: bold;
        padding: 10px 16px 16px 16px;
      }
      :host div#items {
        margin: -10px 0px !important;
      }
    show_header_toggle: False
    entities:
      - input_select.user_selection
      - !include /home/homeassistant/.homeassistant/ui-lovelace/ui-lovelace-User-Setup-Notifications.yaml
      - !include /home/homeassistant/.homeassistant/ui-lovelace/ui-lovelace-User-Setup-Automations.yaml
      - !include /home/homeassistant/.homeassistant/ui-lovelace/ui-lovelace-User-Setup-Components.yaml

The key may be in the title of this card but should I be using the hui-element card with fold-entity-row when it is used as a row item in an entities card?

This must be asked before, but canā€™t find it above, nor in the docs:
replacing a regular entities card with automations (and the header_toggle) to fit into an entities card with the fold-entity-row makes me lose the header_toggle.
Can we somehow still make that show up? Donā€™t have the automations in a group (yet) and like to prevent the extra group, especially for this. Below is what I am using now:

type: entities
entities:
  - ...
  - ...
  - type: custom:fold-entity-row
    head:
      type: section
      label: Espresso automations
    group_config:
      secondary_info: last-triggered
    padding: 0
    entities:
      - automation.espresso_ready
      - automation.espresso_ready_off
      - automation.notify_espresso_ready
      - automation.espresso_bijvullen
      - automation.espresso_bijgevuld

would be cool if a (group_)config show_header_toggle would be available? Or any other way to realize the toggle of courseā€¦

update

aded the group, to auto fill using:

  - type: custom:fold-entity-row
    head: group.espresso_automations
    group_config:
      secondary_info: last-triggered
    padding: 0

but now I cant see/set the section divider? Which is a pity because using the type: divider row above this, isnt identical to the wider section divider of the fold-entity-row:

getting closeā€¦ just need to find these details :wink:

First, my best wishes and warm gratitude to the Developer!
Thanks a lot for this card.

Next, my question.
I wonder is it possible to show ā€œVā€ button on the right from the ā€œnormalā€ position of the state?
I mean this:

Look, the fold-row has a state located not just under the state from the previous row.
Is it possible to make it like this:
1
I do understand that my example picture looks not so perfect - the ā€œVā€ button located TOO CLOSE to the right border. But may be you can propose another solution which is better, I hope.

I like toggles lined up too. Could be the arrow rendered on the left side of the toggle? Or maybe fold/unfold could be achieved by some gesture/double-click?

with regards

Not sure it is a good solution.
A length of the stateā€™s string may be different for every entity.
So the horizontal position of this ā€œarrowā€ will be different, not nice.

I have been thinking about where & how to locate this ā€œarrowā€ - now I think that the current implementation has more pros than cons. I think now it is quite good.

For scenario when the card renders only toggle buttons, left side of those toggles seems to be sufficient.
Maybe card-mod would help - it would be satisfying for my needs but I donā€™t know how to achieve (if possible)

I have issues to find the right config for my fold entity row card with an conditional on it.

What i have:

          - type: entities
            style: |
              ha-card {
              margin: 0px 14px -5px 14px;
              }
            entities:
              - type: custom:fold-entity-row
                head: group.woonkamer
                entities:
                  - light.woonkamer
                  - light.kast
                  - light.booglamp
              - type: custom:fold-entity-row
                head: group.keuken
                entities:
                  - light.bar_1
                  - light.bar_2
                  - light.koffie
                  - light.spoelbak
              - type: custom:fold-entity-row
                head: group.eethoek
                entities:
                  - light.eettafel_links
                  - light.eettafel_rechts             
             
              - type: conditional
                conditions:
                  - entity: group.hal
                    state_not: "off"
                card:
                  type: custom:fold-entity-row
                  head:  group.hal
                  label: nested
                  entities:
                    - light.hal_1
                    - light.hal_2
                    - light.hal_3

That gives this error:
image

Does anyone have an suggestion to help me?

hey, iā€™m trying to setup fold-entity-row in a entity-filter card.
Please see my code:

card:
  type: glance
  title: Offene Fenster/TĆ¼ren
type: entity-filter
entities:
  - type: 'custom:fold-entity-row'
    head:
      type: section
      label: Wohnzimmer
    entities:
      - binary_sensor.fenster_links_wohnzimmer
      - binary_sensor.fenster_rechts_wohnzimmer
  - type: 'custom:fold-entity-row'
    head:
      type: section
      label: Schlafzimmer
    entities:
      - binary_sensor.fenster_links_schlafzimmer
      - binary_sensor.fenster_rechts_schlafzimmer
  - type: 'custom:fold-entity-row'
    head:
      type: section
      label: KĆ¼che
    entities:
      - binary_sensor.tur_balkon
  - type: 'custom:fold-entity-row'
    head:
      type: section
      label: Arbeitszimmer
    entities:      
      - binary_sensor.tur_loggia

state_filter:
  - 'on'

It does not throw any errors, but it also does not show me any open windows/doors, even they are there? Can you help me out here?

thanks, Ben

I would like all the entities in my card to be at the same hierarchy and equal padding; where I can expand/collapse to make the card smaller/bigger, respectively.

I couldnā€™t find any examples on lovelace-fold-entity-rowā€™s GitHub page demonstrating this. I tried gluing two cards together by combining a regular card and a fold-entity-row; however, for some reason the fold-entity-row card is not respecting the cardā€™s right padding (see below when the card expands).

Collapsed:
1

Expanded:

The fold-entity-row card below ignores the cardā€™s right margin. The values are all the way to the right edge of the card:
2

How can I force the fold-entity-row to display the entity values correctly? Maybe, Iā€™m not doing it right? Below is the code:

mode: vertical
title: Weather
type: 'custom:stack-in-card'
cards:
  - entities:
      - entity: sensor.blank_sensor
        image: /local/images/Michael.png
        name: Michael
        style: |
          :host {
            color: #A5AEB7;
            font-size: 16px;
            font-weight: bold;
          }
      - entity: sensor.sm_n960u_battery_level
        name: Battery Level
      - entity: sensor.sm_n960u_battery_state
        name: Battery State
      - entity: sensor.sm_n960u_wifi_connection
        name: Wi-Fi
      - entity: sensor.michael_location
    type: entities
  - type: 'custom:fold-entity-row'
    head:
      type: section
      label: More...
    entities:
      - binary_sensor.note9_htpc
      - binary_sensor.note9_jblflip4
      - entity: binary_sensor.note9_acousticsheep

Head toggle doesnā€™t show state color. For al the other entities I can see the state color of the entities, except for the head toggle. Is it possible to also show the state color in the head entity?

Lights

title: Lampen
icon: 'mdi:lightbulb-on-outline'
type: entities
show_header_toggle: false
entities:
  - entity: input_boolean.lights_manual
    state_color: true
  - type: 'custom:fold-entity-row'
    head: input_boolean.lights_on
    state_color: true
    entities:
      - entity: light.lamp_huiskamer_level
        min: 2
        step: 2
        toggle: true
        type: 'custom:slider-entity-row'
      - entity: light.lamp_eettafel_level
        min: 2
        step: 2
        toggle: true
        type: 'custom:slider-entity-row'
      - entity: light.lamp_keuken_level
        min: 2
        step: 2
        toggle: true
        type: 'custom:slider-entity-row'
      - entity: light.keuken_led_strip
        min: 2
        step: 2
        toggle: true
        type: 'custom:slider-entity-row'
      - entity: light.lamp_hal_level
        min: 2
        step: 2
        toggle: true
        type: 'custom:slider-entity-row'
      - entity: light.lamp_wc_level
        min: 2
        step: 2
        toggle: true
        type: 'custom:slider-entity-row'
      - entity: light.overloop
        min: 2
        step: 2
        toggle: true
        type: 'custom:slider-entity-row'

Report it: https://github.com/thomasloven/lovelace-fold-entity-row/issues

Hello,

First of all thanks alot for your very handy cards!

I have got a short question. Is it possible to change the name of a head?

type: entities
entities:
  - type: 'custom:fold-entity-row'
    head: light.lg_woonkamer

I would like to rename the name used in the entity.

thanks!

use the padding: 0 option:

  - type: custom:fold-entity-row
    head:
      type: section
      label: Label
    padding: 0
    entities:

Thanks for the tip. If I set padding to zero, it does align the rest of the items to the right-most edge of the card. However, I want to keep the default padding since I want it to match the padding of the rest of my Lovelace cards.

Just getting started with Home Assistant and trying to make a collapsed list for each room but it doesnā€™t seem to like when I try to add a second collapsed entry can anyone tell me what I would need to change to make this work? If I remove the kitchen settings the Family Room looks right.

type: entities
 entities:
  - type: 'custom:fold-entity-row'
    head: light.family_room_light
    entities:
      - light.family_room_lamp
      - light.family_room_ceiling_light
      - fan.family_room_ceiling_fan
      - light.family_room_closet_light
  - type: 'custom:fold-entity-row'
    head: light.kitchen_light
    entities:
      - light.island_light
      - fan.island_fan
      - light.under_cabinet_left_light
      - light.under_cabinet_right_light

Edit: Today when I copied this and pasted it back in it is working. Strange.

not sure what issue you might be experiencing, but using the padding: 0 makes the entities in the fold appear with the exact same left and right padding as the entities above the fold. If you are not seeing that, please report back so we can help.

1 Like