akj1
(Akj)
November 9, 2024, 7:14am
1
Hi, Please help me with a question that boggles my mind. Im sure it is staring right at me.
How do I change the color of a button card background and icon. Let’s say a light blue background with a yellow icon (regardless the state of the entity)
show_name: true
show_icon: true
type: button
tap_action:
action: navigate
navigation_path: /lovelace/7
icon: mdi:dharmachakra
entity: media_player.01b0d729_98179fc5
show_state: false
name: Segway Office
layout_options:
grid_columns: 2
grid_rows: 3
waank1
(Waank1)
January 28, 2025, 3:59am
2
Following. I have yet to figure it out. So I just use Custom Button Cards, but I sure would like to know if it’s possible
It’s possible with card_mod in multiple ways…
show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: light.xxxx
card_mod:
style: |
ha-card {
background: lightblue !important;
--state-color: yellow !important;
color: red !important;
}
card_mod:
style: |
ha-card {
--state-light-on-color: yellow !important;
--state-inactive-color: grey !important;
background: lightblue !important;
color: red !important;
}