I currently have a horizontal stack-in-card that looks like this:
I am trying to get the buttons to actually look like buttons (with a colored background and/or border-shadow. So they look more like this:
Here’s my code for stack-in-card below:
cards:
- cards:
- color: 'rgb(66, 134, 244)'
color_type: card
hold_action:
action: call-service
icon: 'mdi:power'
name: 'ON'
styles:
card:
- font-size: 12px
- font-weight: bold
- height: 53px
- color: lightblue
tap_action:
action: call-service
service: shell_command.ac_power_on
type: 'custom:button-card'
- color: 'rgb(66, 134, 244)'
color_type: card
hold_action:
action: call-service
icon: 'mdi:power'
name: 'OFF'
styles:
card:
- font-size: 12px
- font-weight: bold
- height: 53px
- color: darkgray
tap_action:
action: call-service
service: shell_command.ac_power_off
type: 'custom:button-card'
- color: 'rgb(66, 134, 244)'
color_type: card
hold_action:
action: call-service
icon: 'mdi:arrow-down-bold'
name: MILD
styles:
card:
- font-size: 12px
- font-weight: bold
- height: 53px
tap_action:
action: call-service
service: shell_command.ac_temp_78
type: 'custom:button-card'
- color: 'rgb(66, 134, 244)'
color_type: card
hold_action:
action: call-service
icon: 'mdi:arrow-up-bold'
name: MAX
styles:
card:
- font-size: 12px
- font-weight: bold
- height: 53px
tap_action:
action: call-service
service: shell_command.ac_temp_73
type: 'custom:button-card'
type: horizontal-stack
mode: vertical
title: Portable Air Conditioner
type: 'custom:stack-in-card'
As you can see, the lines where I have - color: ‘rgb(66, 134, 244)’, don’t make any difference. I also tried using card-mod
and inserting the below code to my buttons; however, it’s not making any difference either:
style: |
ha-card {
background-color: 'rgb(66, 134, 244)';
}
I’d really appreciate help to add a color background to each button.