Hello everyone,
I am trying to create several buttons with button-card, with which I can select the scene in my bedroom. I write the scene in an input_select. I have succeeded so far.
However, I would now like the icon of the button for the current scene to have a different color. I am currently trying to set the color to red when the “Morning” scene is activated.
My setting in the “state” area seems to be correct, as the icon disappears when the scene is set. However, I don’t want it to disappear, but to turn red. What am I doing wrong?
Here is my button-card:
type: custom:button-card
entity: input_select.schlafzimmer_szene
layout: vertical
show_last_changed: false
aspect_ratio: 1/1
name: Morgen
icon: mdi:clock-time-seven-outline
show_state: true
styles:
icon:
- color: var(--state-icon-color)
name:
- font-weight: bold
- font-size: 16px
- white-space: normal
state:
- value: Morgen
icon:
- color: red
tap_action:
action: call-service
service: input_select.select_option
data:
entity_id: input_select.schlafzimmer_szene
option: Morgen
Thank you for your support