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

Hey everyone,
I am trying to place a conditional card inside a fold-entity-row but I get the error message No row configured .
Does anybody know how to fix this problem?

type: entities
entities:
  - type: custom:fold-entity-row
    head: input_text.text_wildcards
    entities:
      - type: conditional
        conditions:
          - entity: input_text.text_wildcards
            state_not: ''
        card:
          type: entities
          entities:
            - input_text.text_wildcards_2

Because you are trying to use an ā€œentitiesā€ card as a row.

type: entities
entities:
  - type: custom:fold-entity-row
    head: input_boolean.test_boolean
    entities:
      - type: custom:hui-element
        card_type: conditional
        conditions:
          - entity: input_boolean.test_boolean
            state_not: 'off'
        card:
          type: entities
          entities:
            - input_boolean.test_boolean
1 Like

Thank you! Total oversight on my part there!

Do you know if it is possible to have a conditional unfolding? I could not see anything in the docs. So similar to showing the conditional card have a conditional unfold?

Find my post here with config-template-card

After updating core to version 2023.5.2 entity-fold-row stopped working as expected ā€¦

ĪµĪ¹ĪŗĻŒĪ½Ī±

Do we expected an update ?? Or does anyone have a walkthrough please?

seems not to be the case in the repo. not a single new issue filed since a long time

and all working here as expected. did you configure any card_mod or other change to the default workings of the row?

Hard to tell anything since no code was provided.

So, I really like this fold-entity-row combination with the auto-entities for viewing group results. However, Iā€™m starting to look into using the Helpers ā†’ Group instead of hardcoding all my groups in YAML but Iā€™ve noticed very quickly that the Helper version of Groups actually makes a binary_sensor domain entity instead of a group domain entity which breaks the easy fold-entity-row + auto-entities group viewing! :frowning:

type: custom:auto-entities
card:
  type: entities
  title: All groups
filter:
  include:
    - domain: group
      options:
        type: custom:fold-entity-row

Example from: GitHub - thomasloven/lovelace-fold-entity-row: šŸ”¹ A foldable row for entities card, containing other rows

image
I have found that the fold-entity-row still works great with the binary_sensor version (when explicitly included)

Unfortunately, when I look at the Helper-created binary_sensor group in Developer ā†’ States and there isnā€™t anything specific about it that is different than other binary sensors which I could use to tell the auto-entities to display it (using include/exclude functionality).

Anyone know if there is an easy way to display all Helper groups (which are in the binary_sensor domain) without explicitly listing them in the card YAML?

not sure if this is what you want, but are you aware you can do:

    filter:
      include:
        - group: binary_sensor.doors
          state: 'on'
          options:
            secondary_info: last-changed

for those helpers? and probably even a wildcard

     filter:
      include:
        - group: binary_sensor.*
          state: 'on'
          options:
            secondary_info: last-changed

though I havent tested that

I just cant figure out how to style the up/down-toggle.
like change icon or just color or background.

any one done that?

SCR-20240124-kaos-2

code
type: custom:fold-entity-row
head:
  type: custom:mushroom-template-card
  label: padding
  secondary: Glosor vecka {{ states('sensor.current_week') }}
  multiline_secondary: true
  card_mod:
    style: |
      ha-card {
        --card-secondary-font-size: 20px;
        --secondary-text-color: black;
        background: rgba(255,255,255,0.6);
        text-align: left;
      }
      
padding: 0
entities:
  - type: custom:stack-in-card
    cards:
      - type: markdown
        content: |-
          ## - Ƥpple
          ## - banan
          ## - blƄbƤr
          ## - jordgubbe
          ## - hallon
          ## - apelsin
          ## - pƤron
          ## - ananas
          ## - vattenmelon
    card_mod:
      style: |
        ha-card {
          background: darkorange !important;
          --primary-text-color: black; 
          }

Basically, you make the card in the head: transparent, and apply its styling to the div in fold-entity-row which contains it:

type: custom:fold-entity-row
card_mod:
  style:
    .: |
      div#head {
        background: rgba(255, 255, 255, 0.6);
      }
      ha-icon {
        color: red;
      }
head:
  type: custom:mushroom-template-card
  card_mod:
    style: |
      ha-card {
        --card-secondary-font-size: 20px;
        --secondary-text-color: black;
        background: none;
        border: none;
        text-align: left;
      }
  label: padding
  secondary: Glosor vecka {{ states('sensor.current_week') }}
  multiline_secondary: true
padding: 0
entities:
  - type: custom:hui-element
    card_type: markdown
    card_mod:
      style: |
        ha-card {
          background: darkorange !important;
          --primary-text-color: black; 
          }
    content: |-
      ## - Ƥpple
      ## - banan
      ## - blƄbƤr
      ## - jordgubbe
      ## - hallon
      ## - apelsin
      ## - pƤron
      ## - ananas
      ## - vattenmelon

Depending on how youā€™ve set up your theme, you will also need to carry over your card settings to the head div that are implict e.g. any settings for border-radius or any border styles (width, color and so on).

You access the chevron via ha-icon - in my example, Iā€™ve made it red.

Finally, do you really need a stack-in-card in the fold? Why not apply your style directly to the markdown card itself inside a lovelace-hui-element?

Edit: just double checking that you are using f-e-r in an entities card? Otherwise thereā€™s a chance none of this will work.

First off, This is a great card! Love it!! Any idea how to remove the indent on the nested entities?

Check ā€œpaddingā€ property in docs.

Hi All,

Iā€˜ve read the whole thread (I must admit that I didnā€˜t understand everything), but I didnā€™t find a solution to define a card-mod that applies to all entities (head and entities).

Currently I use the following code to define it for each entity separately:


type: entities
entities:
  - type: custom:fold-entity-row
    head:
      entity: cover.alle_markisen
      card_mod:
        style: |
          :host {
          {% if is_state(config.entity,'open') %}
            --paper-item-icon-color: red;
              }
          {%else%}
            --paper-item-icon-color: green
          {%endif%}
               }
    entities:
      - entity: cover.markise_links
        card_mod:
          style: |
            :host {
            {% if is_state(config.entity,'open') %}
              --paper-item-icon-color: red;
                }
            {%else%}
              --paper-item-icon-color: green
            {%endif%}
                 }
      - entity: cover.markise_mitte
        card_mod:
          style: |
            :host {
            {% if is_state(config.entity,'open') %}
              --paper-item-icon-color: red;
                }
            {%else%}
              --paper-item-icon-color: green
            {%endif%}
                 }
      - entity: cover.markise_rechts
        card_mod:
          style: |
            :host {
            {% if is_state(config.entity,'open') %}
              --paper-item-icon-color: red;
                }
            {%else%}
              --paper-item-icon-color: green
            {%endif%}
                 }

Is there a way to define only one card-mod that applies to all entities (head and entities)?

main card-mod thread ā†’ 1st post ā†’ link at the bottom ā†’ f-e-r

Do you mean that one?

hmm, not really fantastic, but yes, this one

well, it could be not obvious from posted examples - but here is your way:

    type: entities
    entities:
      - type: custom:fold-entity-row
        head:
          entity: sun.sun
        padding: 15
        open: true
        entities:
          - entity: sun.sun
          - entity: sun.sun
        card_mod:
          style: |
            :host {
              --paper-item-icon-color: red;
            }

ŠøŠ·Š¾Š±Ń€Š°Š¶ŠµŠ½ŠøŠµ

But what I completely missed - you need to check a stateā€¦
My fault, let me think a bit.

Check this one:

    type: entities
    entities:
      - type: custom:fold-entity-row
        head:
          entity: input_boolean.test_boolean
        padding: 15
        open: true
        state_color: true
        entities:
          - entity: input_boolean.test_boolean_2
          - entity: input_boolean.test_boolean_3
        card_mod:
          style: |
            :host {
              --state-input_boolean-on-color: red;
              --state-input_boolean-off-color: green;
            }

ŠøŠ·Š¾Š±Ń€Š°Š¶ŠµŠ½ŠøŠµ

This is an example for input_boolean, you will need to write a similar code for covers like:

        :host {
          --state-cover-open-color: red;
          --state-cover-closed-color: green;
          --state-cover-closing-color: cyan;
        }

Thank you very much, that helped!

Now this code is working:


type: entities
entities:
  - type: custom:fold-entity-row
    head:
      entity: cover.alle_markisen
    entities:
      - entity: cover.markise_links
        icon: mdi:dock-left
      - entity: cover.markise_mitte
        icon: mdi:dock-top
      - entity: cover.markise_rechts
        icon: mdi:dock-right
    state_color: true
    card_mod:
      style: |
        :host {
          --state-cover-open-color: red;
          --state-cover-closed-color: green;
          --state-cover-closing-color: cyan;
        }

Can I ask another question related to this kind of code? How can I hide the state (ā€žAusā€œ and ā€žGeschlossenā€œ)?:

show_state: false doesnā€™t work:

  - type: custom:fold-entity-row
    head:
      entity: binary_sensor.alle_fenster
    show_state: false
    state_color: true
    card_mod:
      style: |
        :host {
          --state-binary_sensor-on-color: red;
          --state-binary_sensor-off-color: green;
        }