Hi
I’ve set up conditional cards to show a banner at the top of my lovelace when sensors are triggered ie. water leak.
I currently just have a colored bar that blinks with text showing what has been detected but would like to add an icon before the text, when I try to use the ‘layout’ option of ‘icon_name’ the text moves to the right but no icon shows, can someone please let me know where I’m going wrong?
- type: conditional
conditions:
- entity: input_boolean.water_leak
state: "on"
card:
type: horizontal-stack
cards:
- !include ../includes/h-space-1.yaml
- type: custom:button-card
style: |
ha-card {
border-radius: 5px;
box-shadow: none;
}
name: WATER LEAK DETECTED
icon: mdi:pipe-leak
show_icon: true
layout: icon_name
color_type: card
color: rgb(255,155,0)
size: 10%
styles:
card:
- height: 20px
- padding: 5%
- animation: blink 1s ease infinite
name:
- justify-self: start
- font-family: var(--font-family)
- font-size: 16px
- font-weight: bold
- color: rgb(250,250,250)
tap_action:
action: navigate
navigation_path: /lovelace/notifications
hold_action:
action: call-service
service: input_boolean.turn_off
service_data:
entity_id: input_boolean.water_leak
- !include ../includes/h-space-1.yaml
Worked it out, because I’d set the card height the icon was there but so tiny it couldn’t be seen.