Good afternoon.
This is my working button:
type: custom:button-card
entity: switch.irrigazionesulmagazzino
color_type: label-card
name: Irrigaz. Magazzino
state_display: |
[[[
if (entity.state == 'off')
return "Chiusa";
else
if (entity.state == 'on')
return "Aperta";
else
return "Non disponibile";
]]]
show_entity_picture: true
show_state: true
show_name: true
show_label: true
tap_action:
action: toggle
hold_action:
action: more-info
styles:
name:
- color: white
- font-weight: bold
state:
- font-weight: bold
- color: white
card:
- width: 120px
- height: 70px
- background-color: rgb(75, 75, 75)
- font-size: 12px
- border: 5px solid rgb(0, 0, 0)
state:
- value: 'on'
entity_picture: /local/My_icons/Valvola_aperta.svg
styles:
card:
- background-color: coral
- value: 'off'
entity_picture: /local/My_icons/Valvola_chiusa.svg
styles:
card:
- background-color: sienna
- value: unavailable
entity_picture: /local/My_icons/Valvola_unavailable.svg
styles:
card:
- background-color: red
- color: white
- animation: blink 1s ease infinite
- value: unknown
entity_picture: /local/My_icons/Valvola_unavailable.svg
styles:
card:
- background-color: FireBrick
- color: white
- animation: blink 1s ease infinite
but that’s how I want it:
Full size image on the left, a column with 2 rows.
Is possible?