I have three cards in a vertical ‘custom:stack-in-card’ in this order- entities, conditional, entities. I fixed my extra space issue by installing card-mod. Then, I just insert this in the first entites card.
I would guess this happens, because the conditional card is part of a display: grid; parent. It might be solvable by using custom:mod-card and make the display: grid; parent a display: flex; one…
It’s happening to me in the new sections dashboard. i even tried using card mod to set the height to 0px based on conditions. still have a huge gap. going to play with it more tomorrow
The latest version of home assistant using the new “visible” tab seems to do the trick for me. I’m still using my conditional cards inside of another vertical stack (don’t know if that’s necessary, just being lazy). Once I set up my same conditions on the “visible” tab it removes the space when the conditions aren’t met
Please note that in current version of HA (2024.8.2) “visible” tab is not shown in UI for cards inside nested cards (e.g. horizontal and vertical stack). However, you can directly modify the YAML to include visibility support. I assume UI configuration of visibility inside nested cards will be fixed in future release of HA.