Problem with conditional card

Hi all,

long time no see :slight_smile: Had a lot of other stuff to do and not thaaat much time for my HA.

However I am creating some new stuff right now and I am facing a problem with a conditional card.

My code looks like this:

    cards:
      - type: vertical-stack
        cards:
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                entity: input_boolean.mode_fruehschicht
              - type: conditional
                conditions:
                  - entity: input_boolean.mode_nightheat
                    state: "off"
                card:
                  - type: custom:button-card
                    entity: input_boolean.mode_eco
              - type: conditional
                conditions:
                  - entity: input_boolean.mode_nightheat
                    state: "on"
                card:
                  - type: custom:button-card
                    entity: input_boolean.mode_nightheat
              - type: custom:button-card
                entity: input_boolean.mode_boost
              - type: custom:button-card
                entity: input_boolean.mode_zeroheat
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                entity: input_boolean.mode_movie
              - type: custom:button-card
                entity: input_boolean.mode_zock
              - type: custom:button-card
                entity: input_boolean.mode_cooking
              - type: custom:button-card
                entity: input_boolean.mode_dinner

Without the conditional stuff it was all fine. But like this, I get an error in my dashboard:

No card type configured.
[
  {
    "type": "custom:button-card",
    "entity": "input_boolean.mode_nightheat"
  }
]

Any hint whats wrong?

Thanks in advance!

Ooookay found the mistake already.

There shouldn’t be a “-” before a single card. Has to be like this:

    cards:
      - type: vertical-stack
        cards:
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                entity: input_boolean.mode_fruehschicht
              - type: conditional
                conditions:
                  - entity: input_boolean.mode_nightheat
                    state: "off"
                card:
                  type: custom:button-card
                  entity: input_boolean.mode_eco
              - type: conditional
                conditions:
                  - entity: input_boolean.mode_nightheat
                    state: "on"
                card:
                  type: custom:button-card
                  entity: input_boolean.mode_nightheat
              - type: custom:button-card
                entity: input_boolean.mode_boost
              - type: custom:button-card
                entity: input_boolean.mode_zeroheat
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                entity: input_boolean.mode_movie
              - type: custom:button-card
                entity: input_boolean.mode_zock
              - type: custom:button-card
                entity: input_boolean.mode_cooking
              - type: custom:button-card
                entity: input_boolean.mode_dinner