I was wondering how you get these buttons so nicely centered on the display.
All my horizontal stacks start at the outer left edge of the screen, which on a mobile device is even uglier than on the desktop.
See my Tiles above on a card, below that the same in buttons, which are not on a card… can we somehow collect them as a group, give it a title etc. Or do we need to nest the buttons in yet another card?
Yes exactly what @romrider says, they are just 2 blank button cards. One at the beginning of the horizontal-stack and one at the end. You can also use it for vertical stacks.
thx, done that. which makes it better placed indeed. Only wish we could set the gap between buttons… I know this isn’t Tiles, where that is a snap, but without any grid, and no auto sizing, this is really very difficult to setup for more than 1 display.
have another issue. Somehow the Buttons unsharpens (blurs might be too strong a word) my images. At first I thought is was the size of the images (my tiles were a bit smaller than the buttons). In the examples below, my Tiles are larger than the Buttons and still show much crispier.
The images themselves are much larger so they are not blown out of the possible size
Both photographic images as png files. Have a look ( and don’t mind the color difference which ca be caused by the opacity settings)
I don’t follow what you’re doing here.
If I add blank buttons they are the same size as the others in the horizontal stack which means that they all get resized. You seem to have narrow ones.
Unless of course you are hardcoding the widths? Which I guess means a bit of trial and error to get right and really only is useful on mobile?
Ive tried to set the ‘else’ color as default for the button in the button-template, and let the operator template override that for that particular state, but that doesn’t work. The operator doesn’t override the global config so it seems.
Hello
how can i give an exact size for all the card and exact size for each image?
on the example on the image on the right i cannot see the ‘name’ because it is behind the image
Question number 2
is there a way to change color only on the marked area in red ? i dont want the all the card change color when on or off…only that area
I’m struggling with ripple coloring as there is a bug in the component… So for now I won’t release a version with ripple coloring.
I’m also working on adding aspect ratio for your buttons so you’ll not need to specify width and height anymore (example: for a square, aspect ratio would be 1/1) to have buttons the way you want and this will also adapt to whatever the screen size is. I’ll need to modify slightly some CSS, I hope it will not break things too much but hopefully you’re all using templates now so it will be fast to fix
State merging when using template configurations is also incoming alongside with name and entity_picture javascript templating support.
You can use size: xx%, default being 40%
Use a combination of state and style in each state just for the name:
I need some advice from the brain trust. I’m attempting to use button-card to replace custon:fan-control-entity-row and have run into a bit of a wall. Using all of button-card’s new features, I have replicated the look of fan-control-entity-row while adding some nice modifications (like spinning icons).
The challenge has been getting the fan speed buttons to function in the same fashion. With fan-control-entity-row, pressing any one of the speed buttons will do the following:
If the fan is off, pressing a speed button will simultaneously turn the fan on and set the fan speed.
If the fan is on, pressing a speed button will set the fan speed.
This is where I find myself, stuck at the limits of my YAML knowledge. How does one go about creating logic that not only checks for the current state of the fan but simultaneously calls two services (fan.turn_on and fan.speed) when necessary?
I considered using conditionals to monitor the on/off state of the fan but the concept of passing two separate service calls completely eludes me.