I have created maps (e.g. Wifi, BT…) that only show the icon when the corresponding device is switched on.
Now I would like to line up these cards on the top right of my person card, maybe with horizontal stack card.
The symbols should appear one after the other, starting on the right, without gaps. In principle, I would like to have exactly the same look as you know it from your smartphone.
The Stack in card from HACS works like a vertical or horizontal stack but hides the card borders, so icons appear side by side. If you use it to create a horizontal stack and populate that with a grid card, you could add blank buttons on the left to push the icons over to the right - they should be invisible.
If I understood you correctly, this only works if you know the number and size of the cards.
But that is constantly changing. Once no or only one card is visible, another time maybe four, for example BT, mute, wifi and wifi name (although the name of the network can vary greatly in length).
The size of the buttons is determined by the number of squares in the grid - so you just include more than you need until the size is right. The example below is a vertical stack, each row consisting of a 10-square grid:
To right-align the buttons you would put blank ones on the left. To handle a changing number of buttons, you might experiment with conditional cards.
You’re right about including names, though. The grid above only really works for icons.
Hello Stiltjack, the idea is good, but as you mentioned, it only works with fixed sizes. In addition, it is a elaborate solution. I was hoping there was a programmable one.
The link in your second posting has nothing in common with my problem, or didn’t I understand something there, didn’t I?