You need to create the button-card inside a horizontal-stack, just like all other rows you created. This is what it actually means:
So you have ONE vertical-stack, that places all cards inside it under another. Then inside that, you place horizontal-stacks, containing cards you want in a horizontal line.
In need 2 rows, one row with my buttons, and the other with my sensors.
If you need two rows, then you need to create two rows, just like I explained. A horizontal-stack is a row of cards. So if you need 2 rows, create two horizontal-stacks and put both stacks inside a vertical-stack. Makes sense?
That is all possible, but that’s not what this thread is about. That is all up to custom:button-card. You should read the docs of button-card first, because it has a lot of options and is very powerful. All is possible, but you need to make it work and spend a lot of time figuring stuff out. You need to work with state. If you need help regaring button-card, you can ask here: Lovelace: Button card - Share your Projects! / Lovelace & Frontend - Home Assistant Community (home-assistant.io)
trying to get a background on a horizontal-stack (with a couple of custom:button-card s) in a stack-in-card, I am stuck. Apparently we can not (yet) set a background on a horizontal stack?
as explained here I’ve tried the various options known to me, and some alternatives, none of which come close to what I am looking for:
Id like the background to only show on the horizontal stack, and have the reset of the stack-in-card as regular card.
Would you know of a way, or, if not, be willing to see if either of your cards could be FR’ed…?
I think I’m being thick but I can’t seem to keep a margin between each card in the stack. This is what I’ve put together without any joy. Can you point me to what I should be doing. Thanks
Hi Rom, again an amazing card that I’m trying to fit in… I had some trouble initially figuring out how the background works but got this solved.
One maybe stupid question, but is there a simple way to play with the size and styling of the card ? Currently I tried using card-mod but without success.
Check your indentations. Right at the top, below the mod-card. Whenever you see: card (and not cards), this ALWAYS means the code expects ONE card. So no array (-).
So leave out the (-) before the stack in card and put the indents correct, then the code is correct. (I’m on mobile right now, so difficult copy/pasting your code with fix).
Thank you. After another try adding card-mod, it looks like I can change the background, margin, padding of the card but not width nor length. Am I missing something ?
Hard to say since you deleted your post . But I recommend you to take a look in the card-mod thread. Most likely there already has been code shared regarding this. If not, some amazing people there can help.
I’m already on that track, but also looking at layout card. I think the latter, should be the way forward based on what i’ve seen.
My intent is to have a small card where you can change the colour, Brightness of the light without opening the card itself. The size should be as the other cards.
@ASNNetworks I’ve been able to progress. I got the card to the size I wanted but now within the card, I want to change the size of each card which seems to be impossible. Any ideas ?
@RomRider I’ve been trying card-mod, mod-card, layout-card, etc in multiple scenarios without success, and I’m ready to call it a day. Can you please let me know if you can actually change the height of the cards within the stack-in-card ? Or use layout cards within this card ?