Button Entity Card Size Config

I’m sorry to post such a simple question but I’m having a problem setting the width of a button Entity card.

My config for the card is as follows:

type: entity-button
  action: toggle
  action: more-info
show_icon: true
show_name: true
entity: switch.tv_samsung
icon_height: 60px
icon_width: 60px
name: TV
icon: 'mdi:power-standby

While icon_height: 60px works icon_width: 60px does nothing. Any help would be very much appreciated.

I have had a search of the forum and have not managed to find a topic that could help me. I’m sure this is a problem with my knowledge rather than anything else…

That’s because icon_width is not a valid option.

Notice how icon_width is missing from the configuration variables?

I did notice, yes. I had hoped width would come under ‘(Advanced users can use other CSS values if they like)’.

Is there any option for controlling the width of the button so it does not span the entire screen?

No, the width of cards is controlled by the number of panels that you have as well as the size of your screen.

Also, you should note that icon_height does not control the height of the button. It controls the height of the icon.

If you want square buttons, you should move towards the custom:button-card. It has much more control over what you can do. One of the options for custom button card is to retain an aspect ratio.

1 Like

Excellent. Thanks for your help.

Could you possibly guide me as to how one would install this please?

HACS Store