Help on Vertical Stack Card

I’m trying to join two cards into a vertical stack but for the life of me I can’t get it to work. Any YAML experts out there who can help?

Existing cards are:

  type: glance
filter:
  exclude:
    - entity_id: switch.fridge
    - entity_id: switch.router_plug
    - entity_id: switch.oven_extractor
  include:
    - domain: switch
      options:
        tap_action:
          action: toggle
      state: 'on'
    - state: unavailable
    - domain: light
      options:
        tap_action:
          action: toggle
      state: 'on'
show_empty: false
type: 'custom:auto-entities'

and

cards:
  - type: glance
    entities:
      - entity: sensor.mum
      - entity: sensor.time_to_home
        icon: 'mdi:car'
        name: Home in..
      - entity: sensor.dad
      - entity: sensor.when_home
        icon: 'mdi:bus'
        name: Home in..
      - entity: sensor.boo
    show_name: false
  - cards:
      - entity: light.lounge_lights
        image: /local/lounge.jpg
        name: Lounge
        show_name: true
        show_state: false
        tap_action:
          action: toggle
        type: picture-entity
      - entity: group.daisys_bedroom
        image: /local/daisys_bedroom1.jpg
        show_name: true
        show_state: false
        tap_action:
          action: toggle
        type: picture-entity
    type: horizontal-stack
  - cards:
      - entity: switch.garage
        image: /local/garage1.jpg
        show_state: false
        tap_action:
          action: toggle
        type: picture-entity
      - entity: switch.front_office
        image: /local/office.jpg
        show_state: false
        tap_action:
          action: toggle
        type: picture-entity
    type: horizontal-stack

Thanks!

this?

cards:
  - type: vertical-stack
    title: vertical stack
    cards:
    - type: glance
      filter:
        exclude:
          - entity_id: switch.fridge
          - entity_id: switch.router_plug
          - entity_id: switch.oven_extractor
        include:
          - domain: switch
            options:
              tap_action:
                action: toggle
            state: 'on'
          - state: unavailable
          - domain: light
            options:
              tap_action:
                action: toggle
            state: 'on'
      show_empty: false
    - type: glance
      entities:
        - entity: sensor.mum
        - entity: sensor.time_to_home
          icon: 'mdi:car'
          name: Home in..
        - entity: sensor.dad
        - entity: sensor.when_home
          icon: 'mdi:bus'
          name: Home in..
        - entity: sensor.boo
      show_name: false
    - cards:
        - entity: light.lounge_lights
          image: /local/lounge.jpg
          name: Lounge
          show_name: true
          show_state: false
          tap_action:
            action: toggle
          type: picture-entity
        - entity: group.daisys_bedroom
          image: /local/daisys_bedroom1.jpg
          show_name: true
          show_state: false
          tap_action:
            action: toggle
          type: picture-entity
      type: horizontal-stack
    - cards:
        - entity: switch.garage
          image: /local/garage1.jpg
          show_state: false
          tap_action:
            action: toggle
          type: picture-entity
        - entity: switch.front_office
          image: /local/office.jpg
          show_state: false
          tap_action:
            action: toggle
          type: picture-entity
      type: horizontal-stack
1 Like

Afraid not, “no card type found” and you dropped the key card type of type: ‘custom:auto-entities’ which even if I add back in fails. Thanks for trying though! Perhaps I can’t stack this particular combination?

If you get an error with this

Then you probably haven’t installed or referred that custom card correctly?
I can’t see why it would fail on that. It’s probably an indentation issue. Your first code extract was not copied correctly so you may want to review this?

Both cards work individually so I don’t believe the indentation is incorrect. I also have a different working card using the custom component. Problem is the combination somehow

Your spacing is off for auto entities. You got type: glance in the middle of nothing. So you’re either missing a line above type:glance, you didn’t copy the line when pasting here, or the indentation is wrong there.

I would expect your configuration for that card to be:

card: #<---------------MISSING
  type: glance
filter:
  exclude:
    - entity_id: switch.fridge
    - entity_id: switch.router_plug
    - entity_id: switch.oven_extractor
  include:
    - domain: switch
      options:
        tap_action:
          action: toggle
      state: 'on'
    - state: unavailable
    - domain: light
      options:
        tap_action:
          action: toggle
      state: 'on'
show_empty: false
type: 'custom:auto-entities'

You must be using the UI yaml editor because your fields are alphabetical. Which is REALLY ANNOYING to read and understand. If you are going to be building complex cards, I recommend switching to yaml mode so that you can organize things in a coherent manner. Alphabetical does not work well for humans to read, but it’s great for computers because it’s easy to sort. Anyways, keeping your alpha order…

Now on to your second issue that I see. You don’t have a type associated with the top most stack. This could be a copy/paste error again. Either way, something is needed. I’m going to assume it’s a vertical stack.

Making the final output:

- cards:
    - card:
        type: glance
      filter:
        exclude:
          - entity_id: switch.fridge
          - entity_id: switch.router_plug
          - entity_id: switch.oven_extractor
        include:
          - domain: switch
            options:
              tap_action:
                action: toggle
            state: 'on'
          - state: unavailable
          - domain: light
            options:
              tap_action:
                action: toggle
            state: 'on'
      show_empty: false
      type: 'custom:auto-entities'
    - cards:
        - type: glance
          entities:
            - entity: sensor.mum
            - entity: sensor.time_to_home
              icon: 'mdi:car'
              name: Home in..
            - entity: sensor.dad
            - entity: sensor.when_home
              icon: 'mdi:bus'
              name: Home in..
            - entity: sensor.boo
          show_name: false
        - cards:
            - entity: light.lounge_lights
              image: /local/lounge.jpg
              name: Lounge
              show_name: true
              show_state: false
              tap_action:
                action: toggle
              type: picture-entity
            - entity: group.daisys_bedroom
              image: /local/daisys_bedroom1.jpg
              show_name: true
              show_state: false
              tap_action:
                action: toggle
              type: picture-entity
          type: horizontal-stack
        - cards:
            - entity: switch.garage
              image: /local/garage1.jpg
              show_state: false
              tap_action:
                action: toggle
              type: picture-entity
            - entity: switch.front_office
              image: /local/office.jpg
              show_state: false
              tap_action:
                action: toggle
              type: picture-entity
          type: horizontal-stack
      type: vertical-stack
  type: vertical-stack
1 Like

Thanks Petro,

Your config didn’t work but it set me on the right path and I eventually got it working with the below. I’m sure no-one else will have use for it but for completeness my working card is:

cards:
  - entities:
      - entity: sensor.mum
      - entity: sensor.time_to_home
        icon: 'mdi:car'
        name: Home in..
      - entity: sensor.dad
      - entity: sensor.when_home
        icon: 'mdi:bus'
        name: Home in..
      - entity: sensor.boo
    show_name: false
    type: glance
  - cards:
      - entity: light.lounge_lights
        image: /local/lounge.jpg
        name: Lounge
        show_name: true
        show_state: false
        tap_action:
          action: toggle
        type: picture-entity
      - entity: group.daisys_bedroom
        image: /local/daisys_bedroom1.jpg
        show_name: true
        show_state: false
        tap_action:
          action: toggle
        type: picture-entity
    type: horizontal-stack
  - cards:
      - entity: switch.garage
        image: /local/garage1.jpg
        show_state: false
        tap_action:
          action: toggle
        type: picture-entity
      - entity: switch.front_office
        image: /local/office.jpg
        show_state: false
        tap_action:
          action: toggle
        type: picture-entity
    type: horizontal-stack
  - card:
      type: glance
    filter:
      exclude:
        - entity_id: switch.fridge
        - entity_id: switch.router_plug
        - entity_id: switch.oven_extractor
      include:
        - domain: switch
          options:
            tap_action:
              action: toggle
          state: 'on'
        - state: unavailable
        - domain: light
          options:
            tap_action:
              action: toggle
          state: 'on'
    show_empty: false
    type: 'custom:auto-entities'
type: vertical-stack