'No card type configured' using !include on a conditional card

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

what version of HA are you running?

Ha version 101.3

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

a yes, again the conditional card fools me. thanks for you sharp eye! working as desired now.

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.

Sorry buddy I’m new here and I’m having trouble knowing how to solve the problem but I will remove the post

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.

11 covers how to format code.

De qualquer forma agradeço