thomasloven / lovelace-layout-card

🔹 Get more control over the placement of lovelace cards.
MIT License
1.08k stars 127 forks source link

Can't figure out how to force cards onto a new column since update #122

Closed Shaun-Harrison closed 3 years ago

Shaun-Harrison commented 3 years ago

Hello

I use to be able to use - break to be able to force cards into a new column when using the vertical layout

I use yaml mode and this is how i've got the code roughly set out

---
title: HA
views:
  - title: HA
    panel: true
    cards:
      - type: custom:layout-card
        layout: vertical
        cards:
          - card 1
          - card 2
          - break
          - card 3
          - card 4
          - break
          - card 5 

This would have the following layout

Card 1 Card 3 Card 5 Card 2 Card 4

But now I get an error message saying Config is not an object break

I've tried changing - break to - layout-break or -type: custom:layout-break but no joy so far

VDRainer commented 3 years ago

I created a view in my Test HA with the UI and inspected the json in .storage/lovelace. This works for me:

 views:
    - title: your title
      path: your_path
      icon: mdi:raspberry-pi
      type: custom:vertical-layout
      layout:
        #width: 300
        max_cols: 3
      cards:
        - card 1
        - card 2
        - type: custom:layout-break
        - card 3
        - ...
Shaun-Harrison commented 3 years ago

HI @VDRainer

That has solved it for me! Thank you very much