Need a Little Help with fold-entity-row

I’m having trouble with the fold-entity-row. It works, but I can’t get the formatting correct.


  - title: Office
    path: office2
    icon: mdi:desktop-mac
    cards:
        # The markdown card will render markdown text.
      - type: markdown
        content: >
          ## Office
      - type: custom:fold-entity-row
        head:
          type: section
          label: Lights
        open: true
        entities:
          - entity: group.basement_desk_lamps
            name: Lamps
            icon: mdi:lamp
          - type: custom:slider-entity-row
            entity: light.basement_office_backlight
            name: Backlight
            icon: mdi:lamp
            toggle: true
            step: 5

Produces

It functions correctly, however I can’t seem to get it to show the card background like below or like the examples on github.

I don’t use fold-entity-row but my guess is it’s because you’re using it as a card when it was designed to be used as a row in an entities card.
As it says in the docs:

Fold away and hide rows in lovelace entities cards.

It’s up to the entities card to show the card background.

1 Like

Thanks, that helped. Wish I could get the bar between “Office” and the lights.

  - title: Office
    path: office3
    icon: mdi:desktop-mac
    cards:
        # The markdown card will render markdown text.
      - type: markdown
        content: >
          ## Office
      - type: entities
        show_header_toggle: false
        entities:
          - type: custom:fold-entity-row
            head:
              type: section
              label: Lights
            open: true
            entities:
              - entity: group.basement_desk_lamps
                name: Lamps
                icon: mdi:lamp
              - type: custom:slider-entity-row
                entity: light.basement_office_backlight
                name: Backlight
                icon: mdi:lamp
                toggle: true
                step: 5

Wrap them both in stack-in-card

1 Like

Thanks.


  - title: Office
    path: office3
    icon: mdi:desktop-mac
    cards:
      - type: custom:stack-in-card
        mode: vertical
        cards:
          - type: markdown
            content: >
              ## Office
          - type: entities
            show_header_toggle: false
            entities:
              - type: custom:fold-entity-row
                head:
                  type: section
                  label: Lights
                open: true
                entities:
                  - entity: group.basement_desk_lamps
                    name: Lamps
                    icon: mdi:lamp
                  - type: custom:slider-entity-row
                    entity: light.basement_office_backlight
                    name: Backlight
                    icon: mdi:lamp
                    toggle: true
                    step: 5