Hallo,
wie kann ich bei state “on” das Icon anzeigen lassen und bei default nicht?
type: custom:button-card
color_type: card
entity: automation.schlafzimmer_unten_fenstersicherung
name: Schlafzimmer Fenster<br>Überwachung eingeschaltet
color: white
show_entity_picture: true
show_icon: false
size: 50%
tap_action:
action: toggle
double_tap_action:
action: more-info
styles:
card:
- filter: opacity (70%)
- height: 80px
- font-weight: bold
- color: white
- font-size: 19px
- justify-self: start
- padding: 10px 5px
- padding-top: 10px
- font-family: Helvetica
icon:
- color: white
- width: 50px
- height: 50px
- padding: 0px 0px 5px 0px
state:
- value: 'on'
entity: automation.schlafzimmer_unten_fenstersicherung
color: red
show_icon: true
icon: mdi:alert
styles:
card:
- animation: blink 0.2s linear infinite
- font-size: 17px
- filter: drop-shadow(0 0 1.0rem rgb(255,255,255))
- border: 5px
- operator: default
name: Schlafzimmer Fenster<br>Überwachung ausgeschaltet
color: '#006400'

Wenn ich oben im code show_icon auf true setze ist natürlich bei default auch wieder ein Icon!