not sure which thread to put this, so please allow a dedicated post…
have this button-card I want to show conditionally, when a persistent notification is active:
- type: conditional
conditions:
- entity: persistent_notification.notification
state: notifying
card:
- !include /config/lovelace/includes/include_button_updater.yaml
without the condition, this button is showing fine. However, if I use the above in a horizontal stack, or even standalone:
type: horizontal-stack
cards:
- type: custom:button-card
template: horizontal-filler
- !include /config/lovelace/includes/include_button_trash_alert.yaml
- type: conditional
conditions:
- entity: persistent_notification.notification
state: notifying
card:
- !include /config/lovelace/includes/include_button_updater.yaml
- type: custom:button-card
color_type: blank-card
- type: custom:button-card
color_type: blank-card
- type: custom:button-card
template: horizontal-filler
I get ‘no card type configured’
If I put the conditional card in the button card itself,
type: conditional
conditions:
- entity: persistent_notification.notification
state: notifying
card:
type: custom:button-card
template: button_body
entity: 'binary_sensor.updater'
icon: 'mdi:home-assistant'
aspect_ratio: 1/1
name: Hassio
show_state: false
styles:
card:
- font-size: 10px
etc
etc
it works alright (but I don’t want the card to be hidden on all views, so thats not the real solution for me now…)
It must be a referencing issue, but I cant see it. what am I missing? Or is using an include simply impossible with the conditional card maybe?
1 Like
petro
(Petro)
November 22, 2019, 1:55pm
2
what version of HA are you running?
petro
(Petro)
November 22, 2019, 3:05pm
4
Ah, i see the problem. get rid of the minus
- type: conditional
conditions:
- entity: persistent_notification.notification
state: notifying
card: !include /config/lovelace/includes/include_button_updater.yaml
EDIT: To clarify, you 're putting a listed item into a slot that expects a single card without a list.
2 Likes
petro:
type: conditional conditions: - entity: persistent_notification.notification state: notifying card: !include /config/lovelace/includes/include_button_updater.yaml
a yes, again the conditional card fools me. thanks for you sharp eye! working as desired now.
petro
(Petro)
May 19, 2020, 8:17pm
7
No you don’t. You aren’t using a conditional card. Also, you should learn how to properly format your post. I recommend creating a new post because your issue is unrelated to OPs issue.
RodrigoSilva
(Rodrigo Ferreira R Silva )
May 19, 2020, 8:33pm
8
Sorry buddy I’m new here and I’m having trouble knowing how to solve the problem but I will remove the post
petro
(Petro)
May 19, 2020, 8:36pm
9
no need to remove, just follow the guidelines when making a new post and properly format your code. Someone will be able to help you.
petro
(Petro)
May 19, 2020, 8:37pm
10
Before we begin…
This forum is not a helpdesk
The people here don’t work for Home Assistant, that’s an open source project. We are volunteering our free time to help others. Not all topics may get an answer, never mind one that helps you solve your problem.
[image]
This also isn’t a general home automation forum, this is a forum for Home Assistant and things related to it. Any question about Home Assistant, and about using things with Home Assistant, is welcome here. We can’t help you with e…
11 covers how to format code.
RodrigoSilva
(Rodrigo Ferreira R Silva )
May 19, 2020, 8:42pm
11
De qualquer forma agradeço