šŸ”¹ Layout-card - Take control of where your cards end up

Thanks.
Yeah the majority of it is in the tablet files you can see HERE with some bits in other yamls.
I canā€™t remember how up to date my GitHub is so if you want something let me know :+1:

Thatā€™s awesome, thank you so much. Can you tell me where you defined your gird layout though please?

Yeah thatā€™s in my main tablet.yaml file HERE i need to reorganise my files tbh just not got round to it.

Ah, I see now. Thank you again.

Same here. I was eager to play with the new subview functionality and ended wondering why I cannot change the view layout anymore:

In addition, I have reinstalled the Layout-card add-on but with no success. So I also suspect that this malfunction may have something to do with the recent HA 2022.10.x update.

click on the three dots at the top and you will find a solution to your problem :wink:

Do you mean that I have to edit it in YAML? These are my two options when I click on the 3 dots:

grafik

Yes :slight_smile: my friend

Thank you for the clarification, @andiukas! It seems that I had not understood the earlier postsā€¦

In principle, I have no problem with YAML, but this is a step backwards in usability for me. I hope that a GUI selectable layout option will return one day. :slight_smile:


Dear Thomas @thomasloven,

Can you please provide a clearer explanation on your GitHub page? Although there is a short note

Please note that the ā€œLAYOUTā€ tab in the animation below is now incorporated in the ā€œSETTINGSā€ tab instead.

the obviously outdated video suggests that there could still be a layout setting accessible via the GUI somewhere in the settings tab. At least I got confused by it. Many thanks!

Hi,

I wonder if I can get some help with the height of iFrame card. I was able to put the Sonos card next to the iFrame page. Please see photo below. However, the iFrame webpage (ActionTiles) is very short. I looked at the GitHub documentation, and itā€™s not very clear to me how I can make the ActionTiles dynamic or much much longer so I can have the iFrame can touch all the way down to the bottom of the screen. I put the yaml code below. Can anyone please help me how I can make iFrame longer?

type: custom:layout-card
layout_type: custom:grid-layout
layout_options:
  grid-template-columns: 80% 20%
  grid-template-rows: auto
  grid-template-areas: |
    ā€œleft rightā€
cards:
  - type: iframe
    url: https://beta.actiontiles.com/panels
    aspect_ratio: 50%
  - type: custom:mini-media-player
    entity: media_player.sonos
    artwork: full-cover
    sound_mode: full
    info: scroll
    scale: 1.7

Hi,
How do I force the layout not to have space.
I would like the ā€˜Libbyā€™ card stick to the ā€˜Generalā€™ one without the gap.

Thanks

canā€™t you just put both cards into a vertical stack ?

Yes, but Iā€™ll have one long card.
Iā€™d like later to add a frame around each of the cards. BTW, how do I do it?

Does anyone still use the type: custom:horizontal-layout for a view?
My - type: custom:layout-break cards donā€™t do anything; the next card gets placed behind the previous one as if the layout-break card didnā€™t exist.
If I use

    view_layout:
      column: 1

for the next card, it gets placed in column 1 BUT as the row fills up, the upper rows (where the ā€œbreakā€ was set) now get filled too! WTF?

I would want this layout (numbers represent cards):

D1 D2 D3
E1 E2 E3 E4 E5 E6
K1 K2 K3 K4 K5

but I get:

D1 D2 D3 E4 E5 E6
E1 E2 E3 K4 K5
K1 K2 K3

Grid layout is no option since I have so much different screen sizes (mediaquery would drive me nuts).

So how do I Take control of where your cards end up?
Gimme a break!

Have you tried gap card, it come with layout card?

Yep, it works as expected - creates a gap below (even in horizontal layout) the previous card.
No use for my case since the next card gets placed right of it.
Dunno where I went wrongā€¦

views:
  - theme: Backend-selected
    title: Home
    path: home
    type: custom:horizontal-layout
    layout: {}
    icon: mdi:home-automation
    badges: []
    cards:
      - type: entity
        entity: sensor.visual_studio_code_cpu_percent
      - type: entity
        entity: sensor.visual_studio_code_memory_percent
      - type: custom:gap-card
        height: 93
      - type: custom:gap-card
        height: 93
      - type: custom:layout-break
      - type: entity
        entity: sensor.mariadb_cpu_percent
      - type: entity
        entity: sensor.mariadb_memory_percent
      - type: entity
        entity: sensor.node_red_cpu_percent
      - type: entity
        entity: sensor.node_red_memory_percent
      - type: custom:layout-break
      - type: entity
        entity: sensor.deconz_cpu_percent
      - type: entity
        entity: sensor.deconz_memory_percent
      - type: entity
        entity: sensor.esphome_cpu_percent
      - type: entity
        entity: sensor.esphome_memory_percent

Just remembered you wanted more columns, and you donā€™t even need the break cards necessarily.

views:
  - theme: Backend-selected
    title: Home
    path: home
    type: custom:horizontal-layout
    layout:
      max_cols: 7
    icon: mdi:home-automation
    badges: []
    cards:
      - type: entity
        entity: sensor.visual_studio_code_cpu_percent
      - type: entity
        entity: sensor.visual_studio_code_memory_percent
      - &ref_0
        type: custom:gap-card
        height: 93
      - *ref_0
      - *ref_0
      - *ref_0
      - type: entity
        entity: sensor.mariadb_cpu_percent
      - type: entity
        entity: sensor.mariadb_memory_percent
      - type: entity
        entity: sensor.node_red_cpu_percent
      - type: entity
        entity: sensor.node_red_memory_percent
      - type: entity
        entity: sensor.deconz_cpu_percent
      - type: entity
        entity: sensor.deconz_memory_percent
      - type: entity
        entity: sensor.esphome_cpu_percent
      - type: entity
        entity: sensor.esphome_memory_percent
      - type: entity
        entity: sensor.glances_cpu_percent
      - type: entity
        entity: sensor.glances_memory_percent
      - type: entity
        entity: sensor.home_assistant_google_drive_backup_cpu_percent

to be fair, this would be neater with grid layout

this layout wouldnā€™t work on a small screen anyway. For all the many devices i and my family own I never use more than a default and two media queries for smaller screens.

Thanks for your reply.
I never thought of using more than one custom:gap-cardā€¦
Nonetheless I want the cards to align themselves according to the current screen resolution. I never know in advance how much columns would fit (the card widths differ slightly too).
It would be great if there was a possibility to tell the custom:horizontal-layout to not use the space after a custom:break-cardā€¦ :face_with_monocle:
I even tried custom:vertical-layout with three different custom:layout-cards of layout_type: horizontal-layout - nothing.

You posted a screenshot of an exact number of columns, now you say you want it to alter depending on screen size.

The best way to do that is with a grid layout (as I said above), you donā€™t need to have different for every device just choose default 5 columns, smaller than x three columns, smaller than z 1 column

Add for 4 or 2 if you want