I am trying to change the default colour of a button icon when the state = On.
For example on the code below. I have a smart plug controlled by a button.
I can’t seem to figure out how to change the default colour of, yellow/amber to light-green.
Tried following various possible solutions I have discovered on the internet, but no luck
Is there an easy way to set the default button on colour from the yellow/amber colour to something different?
Below is my current code for my Grid Card Configuration :
square: true
type: grid
cards:
- show_name: true
show_icon: true
type: button
tap_action:
action: more-info
entity: sensor.bedroom_temperature
show_state: true
hold_action:
action: none
name: Bedroom
icon: phu:bedroom
card_mod:
style: |
:host {
--paper-item-icon-color: grey
}
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: switch.desk
icon: phu:desk-stand-alt
show_state: false
hold_action:
action: none
card_mod:
style: |
:host {
--paper-item-icon-color: grey
}
- type: custom:mushroom-light-card
entity: light.bedroom_big_light
icon: phu:ikea-jakobsbyn
fill_container: true
show_brightness_control: true
show_color_temp_control: false
collapsible_controls: true
use_light_color: false
show_color_control: false
icon_color: light-green
name: Light
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: switch.corner_light
icon: phu:smart-desk-lamp
hold_action:
action: none
card_mod:
style: |
:host {
--paper-item-icon-color: grey
}
columns: 2
I have been able to make use of the below to change the default icon color to a grey.
card_mod:
style: |
:host {
--paper-item-icon-color: grey
}
Thanks.