šŸ”¹ Auto-entities - Automatically fill cards with entities

Okay, then Iā€™m glad that everything is good between us. :wink: I donā€™t know if I could get there on my own in the future, Iā€™m still at the beginning with HA. And sometimes, as a beginner, you need support in the right direction.

But one more thing: Yes, it is exactly what is shown. A list of all active scenes. I use python_script.set_state in automation to set a custom attribute to the scenes when they are active or not active. The conditions are numeric_state of the attributes of the corresponding entities. And trigger the activation of the scene or attribute changes of the corresponding entities.

But none of that belongs in this thread anymore. So see you soon and all the best.

Guess this is how it worked even a year ago.
About a week ago I demonstrated another person on GitHub same behavior on 2023.x setup.

Itā€™s strange, before the update to 2024.7 there was no such problem, or it was almost unnoticeable, the indent was a couple of extra pixels, but now the indent is at least 15 pixelsā€¦

Sure:

type: vertical-stack
cards:
  - type: custom:button-card
    ....

  - type: custom:auto-entities
    show_empty: false
    card:
      type: entities
    filter:
      include:
        - domain: sunn
  - type: custom:auto-entities
    show_empty: false
    card:
      type: entities
    filter:
      include:
        - domain: sunn
  - type: custom:auto-entities
    show_empty: false
    card:
      type: entities
    filter:
      include:
        - domain: sunn
  - type: custom:auto-entities
    show_empty: false
    card:
      type: entities
    filter:
      include:
        - domain: sunn

  - type: custom:mini-graph-card
    ....

I did say ā€˜minimalā€™ with a purposeā€¦
you cant expect the community to test your config to the minimal state it show the issue you experience.

please strip everything from that config to the bare minimum still showing your problem in the Dashboard

also, tell us what view you are using.
if it is the Sections view, it might very well be that causing more space than you expect. Itā€™s still experimental and has several flukes we hope will get ironed out

@Mariusthvdb Well this is the bare minimum, which shows the configuration in a vertical stack of several custom:auto-entities cards with the show_empty: false option, i.e. when they are empty, they create an empty space of about 15 pixels each, when they have selected entities, and all are displayed, then everything is fine.
I use the old regular panel, just a dark theme.
Thanks!

Check here:

  1. In 2023.x there was same margin in vertical-stack if auto-entities=empty. May be it was changed later & then again changed by 2024.7 - no idea.
  2. I do not think that a stack knows somehow that an inner card is not shown. Similar case described there: ā€œplace 3 stock conditional cards inside a vertical stack - and make these conditions ā€˜falseā€™ā€. Note - with hidden stock cards ā†’ same margin.

Using a filter like:

domain: sunn

gives same result with a simple code.

1 Like

Maybe I donā€™t remember when I added these cards. Before 2024.7 I saw a slight increase in spacing (about 1-2 pixels per card) but it didnā€™t look that out of place. In 2024.7 itā€™s very noticeable.

Yes, I saw it once, but I donā€™t remember if there was a solution to this problem.

I fixed it, I hope itā€™s correct. Thanks!

1 Like

Just specify ā€œvisibilityā€ for the whole stack as a workaround.
Or may be card-mod (display: none) for the stack; but I would choose the 1st way (although it is more complex since you have to create a binary sensor which is OFF if list is empty; visibility does not support templates if I am not mistaken).

I donā€™t quite understand how to do this? I didnā€™t find such a parameter in the documentation, or is it card_mod?

I canā€™t hide the entire stack, there are cards above this block with auto-entity and below that that are always visible.

never did myself, must be like

type: vertical-stack
cards:
  ...
visibility:
 .... here new stock options for visibility

Cannot post a link to visibility docs now.

Then I probably misunderstood you.
You said you have 3 auto-entities (empty) inside a stack; since they are empty - they are not supposed to be shown; but a stack has some inner margin anyway. Means - you need to hide the whole stack somehow either by visibility or by card-mod.

thanks for the edit, that indeed is what I had hoped you did.

I see Ildar helped you out now, and he is correct about the conditional for the container card.
Its default behavior with any of those containers, they are agnostic to their content

It should however be possible to get rid of the stack-card-gap you are seeing between the fixed cards and the auto-entities if the auto-entities were empty

maybe try:

type: custom:mod-card
card_mod:
  style: |
    :host {
      --stack-card-gap: 0;
    }
card:
  type: vertical-stack

this makes sure there is no inside space between the individual cards

If not, you could use another design where this doesnā€™t hinder your view

1 Like

No need, I already found it. Thanks

Iā€™ll try to move all auto-entities to a separate stack and take a look. How can I do this with card mod? I mean hide the entire stack? Do you have an example in your card_mod thread?

see my mod-card example a few post up, and then use a display template

type: custom:mod-card
card_mod:
  style: |
    :host {
      display: none;
    }
card:
  type: vertical-stack

replace none with a relevant template in {{}}

1 Like

card-mod thread ā†’ 1st post ā†’ link at the bottom ā†’ stacks
Just set ā€œdisplay: noneā€ for the stack element.

1 Like