Did you put a grid card around it as stated in my last post? I doublechecked the code and it works within a grid.The custom button itself is in a grid card. We are not talking about a grid of buttons. Maybe it works without a grid card, but than you have to set up more item properties.
type: grid
cards:
- type: 'custom:button-card'
icon: 'mdi:floor-lamp'
entity: switch.plug_go_02
name: Stehlampe
show_state: true
layout: vertical
size: 10%
styles:
card:
- height: 100px
- width: 100px
- background-color: 'rgb(33,38,40)'
- border: '1px solid rgb(80,80,80)'
- border-radius: 10%
- font-family: sans-serif
- padding: 5%
label:
- color: gray
- font-size: 9px
- justify-self: start
- padding: 0px 5px
name:
- text-transform: none
- justify-self: left
- padding: 0px 5px
icon:
- color: 'rgb(243,156,15)'
- width: 50px
- height: 50px
- padding: 0px 55px 5px 0px
state:
- justify-self: left
- font-size: 9px
- padding: 0px 5px
state:
- value: 'on'
styles:
state:
- color: green
card:
- filter: 'drop-shadow(0 0 1.0rem rgb(243,156,15))'
- border: 0px
- value: 'off'
styles:
state:
- color: red
name:
- color: 'rgb(80,80,80)'
icon:
- color: 'rgb(80,80,80)'