What is the best way to have a few entity values covering a full page?

In my boat I am going to use an old phone to show the depth under the hull, close to where I have my downrigger, so I can pull up if the water gets to shallow for the depth I’m fishing at. I also want to show the current speed and the time.

I have tried with card_mod but I couldn’t get it right. The font only changed the size of the icon for depth, not the number.

Here’s a picture of about what I want to achieve. This is very easy to make in the boating software SignalK, but not very customizable. I want to keep everything in Hass, and I want to remove the labels. The depth when I’m docked is 1 meter, and the speed is 0 knots, anything else would have scared me! :joy:

If you have custom:layout_card installed you could start with a i.e “Panel-View-Dashboard” with 1 card i.e Custom:Button_card, with a grid
( Or a “grid-layout-dashboard” )

Panel-view: (1 card)
In There you could create a horizontal-stack, with 2 vertical-stack inside ( 3 if you count right menu as part )
( Or as i mentioned a single Custom:button_card , more cumbersome)

Grid_layout_view:
slightly more “cumbersome” but as i feel , easier to get more precise
as you can set width of columns i.e 33%-67% (or 30-60-10 )
first column: a vertical stack ( fart og dato ) custom:button_card s ?
second column: ( dybde some-card ) custom:button_card ?
third column, (right menu, also a vertical stack, with 3 button-cards)

EDIT: Now i get it,the “right menu” and top row is your phone :joy:

PS: Don’t see “Custom:button_card” as a “Button” You can have it show whatever you want

@boheme61 Thank you very much for answering! Yes, those bars are just the phone. :grin: Ideally I want it to be only numbers when it’s done, even removing the borders around the cards, if that’s possible.

The bottom one looks like a very good way of doing it, but I must be doing something wrong, because I’m just getting the icons for the sensors, not the value. Here’s a screenshot from my pc where I worked on it:

And this is the code:

views:
  - type: panel
    sections:
      - type: grid
        cards:
          - type: heading
            heading: Ny seksjon
    cards:
      - type: horizontal-stack
        cards:
          - type: vertical-stack
            cards:
              - type: custom:button-card
                entity: sensor.fart
                styles:
                  card:
                    - height: 396px
                    - width: 400px
              - type: custom:button-card
                entity: sensor.time
                styles:
                  card:
                    - height: 396px
                    - width: 400px
          - type: custom:button-card
            entity: sensor.dybde
            styles:
              card:
                - height: 800px
                - width: 1240px

Can you see what I am doing wrong here?

Sure, i also prefer no borders

And you basically still use “Sections” which i don’t prefer, then you just added custom:button-cards, no config in those cards ( So obviously you haven’t looked in either the github or the specific Topics in here for Custom:button-card :wink:

I can’t even copy/paste your code(shows me nothing)
How did you create that Dashboard ?

@boheme61 Sorry, I tried to read the info on this page, custom:button-card documentation and get into the more advanced stuff, but it just confused me… Either I’m getting dumber as I grow older (60 now), or the beers I had yesterday are still in me. :joy: The code is taken from the RAW view in the dashboard, I just now removed the heading, which I don’t need. I’m guessing you are getting nothing because the sensors in my boat (and the time integration) aren’t on your system.

I created it this way:

:joy:

It’s Deep reading and hours( edit: Read Month !, before you get a grip of Custom:button-card … btw im 65, no excuse, just get glasses when the txt looks “faded”

I copied and cleaned something from one of my views, not sure it will fit yours
Try to copy/paste this and go on from there

views:
  - type: panel
    sections:
      - type: grid
    cards:
      - type: horizontal-stack
        cards:
          - type: vertical-stack
            cards:
              - type: custom:button-card
                show_icon: false
                custom_fields:
                  kwh: |
                    [[[
                      return `<span style="color: #FFBF00; font-size: 13px">${states['sensor.total_price'].state} SeK/kWh</span>`
                    ]]]
                styles:
                  card:
                    - height: 396px
                    - width: 400px
                  grid:
                    - grid-template-areas: "\"kwh\""
                    - grid-template-columns: 1fr
                  custom_fields:
                    kwh:
                      - align-self: middle
                      - justify-self: center
              - type: custom:button-card
                show_icon: false
                custom_fields:
                  kwh: |
                    [[[
                      return `<span style="color: #FFBF00; font-size: 13px">${states['sensor.tptp_temperature'].state} temp</span>`
                    ]]]
                styles:
                  card:
                    - height: 396px
                    - width: 400px
                  grid:
                    - grid-template-areas: "\"kwh\""
                    - grid-template-columns: 1fr
                  custom_fields:
                    kwh:
                      - align-self: middle
                      - justify-self: center
          - type: vertical-stack
            cards:
              - type: custom:button-card
                show_icon: false
                custom_fields:
                  kwh: |
                    [[[
                      return `<span style="color: #FFBF00; font-size: 13px">${states['sensor.tptp_temperature'].state} temp</span>`
                    ]]]
                styles:
                  card:
                    - height: 800px
                    - width: 1240px
                  grid:
                    - grid-template-areas: "\"kwh\""
                    - grid-template-columns: 1fr
                  custom_fields:
                    kwh:
                      - align-self: middle
                      - justify-self: center

PS: i see 1 draw-back on this way of doing it, It’s not “responsive”, meaning if your narrow down your viewport (i.e flip your phone to vertical) you have to scroll side-way to see the second Vertical stack
Partly do to the horizontal-stack, with 2 vertical-stacks, but also your PX-fixed card-size
( Don’t " Ride the Waves " as the View might “flicker” ( change from landscape to portrait view ) when your boat “tilts” :rofl:
( btw, where do you have your boat ? )

I doubt, because it says View: Panel, so it’s not a grid-layout view, as i see it, RAW edited of a grid -layout view sometimes looks something like this

views:
  - theme: noctis-grey
    path: homestatus
    type: custom:grid-layout
    layout:
      grid-template-columns: 33% 34% 33%
      grid-template-rows: 80px 340px auto auto
      grid-template-areas: |
        "head1 head2 head3"
        "main1 main2 main3"
        "feed1 feed2 feed3"
        "more1 more2 more3"
      padding-left: 0px !important;
      padding-right: 0px !important;
      mediaquery:
        "(max-width: 900px)":
          grid-template-columns: 100%
          grid-template-rows: 100px 300px 200px 100px 280px 200px 100px 280px
          grid-template-areas: |
            "head1"
            "main1"
            "feed1"
            "head2"
            "main2"
            "feed2"
            "head3"
            "main3"
        "(max-width: 1000px)":
          grid-template-columns: 50% 50%
          grid-template-rows: 80px 320px auto auto
          grid-template-areas: |
            "head1 head2"
            "main1 main2"
            "feed1 feed2"
            "more1 more2"
        "(max-width: 1100px)":
          grid-template-columns: 40% auto 40%
          grid-template-rows: 80px 340px auto auto
          grid-template-areas: |
            "head1 head2 head3"
            "main1 main2 main3"
            "feed1 feed2 feed3"
            "more1 more2 more3"
    cards:

Weird, I thought I followed the instructions. Anyway, I have arrived at something close to what I want, the only thing I can’t get it to obey is alignment. I would like to do away with the borders too, but that’s not very important.

  - type: panel
    sections:
      - type: grid
        cards:
          - type: heading
            heading: Ny seksjon
    cards:
      - type: horizontal-stack
        cards:
          - type: vertical-stack
            cards:
              - type: custom:button-card
                custom_fields:
                  fart: |
                    [[[
                      return `<span style="align: center; font-size: 700px">${states['sensor.fart'].state}</span>`
                    ]]]
                show_icon: false
                show_name: false
                styles:
                  card:
                    - height: 600px
                    - width: 600px
              - type: custom:button-card
                custom_fields:
                  fart: |
                    [[[
                      return `<span style="align: center; font-size: 160px">${states['sensor.time'].state}</span>`
                    ]]]
                show_icon: false
                show_name: false
                styles:
                  card:
                    - height: 200px
                    - width: 600px
          - type: custom:button-card
            custom_fields:
              fart: |
                [[[
                  return `<span style="align: center; font-size: 1000px">${states['sensor.dybde'].state}</span>`
                ]]]
            show_icon: false
            show_name: false
            styles:
              card:
                - height: 800px
                - width: 1000px

align: center isn’t doing anything I would expect CSS to do.

That code looks very odd to me, in my laptop/phone
Please show what your View-type is
Edit Dashboard , Then the “Pensil” to the far left !

by align, do you mean this ?

I amended the code to fit to the phone, it didn’t scale.

views:
  - type: panel
    sections:
      - type: grid
        cards:
          - type: heading
            heading: Ny seksjon
    cards:
      - type: horizontal-stack
        cards:
          - type: vertical-stack
            cards:
              - type: custom:button-card
                styles:
                  card:
                    - height: 200px
                    - width: 300px
                custom_fields:
                  fart: |
                    [[[
                      return `<span style="align: center; font-size: 200px">${states['sensor.fart'].state}</span>`
                    ]]]
                show_icon: false
                show_name: false
              - type: custom:button-card
                styles:
                  card:
                    - height: 200px
                    - width: 300px
                custom_fields:
                  fart: |
                    [[[
                      return `<span style="align: center; font-size: 60px">${states['sensor.time'].state}</span>`
                    ]]]
                show_icon: false
                show_name: false
          - type: custom:button-card
            styles:
              card:
                - height: 405px
                - width: 550px
            custom_fields:
              fart: |
                [[[
                  return `<span style="align: center; font-size: 490px">${states['sensor.dybde'].state}</span>`
                ]]]
            show_icon: false
            show_name: false

And it says panel, single card.

I must admit your code was too advanced for me, so I went from only parts of it… But I tried to put in algin-self and justify-self as well now, and that didn’t work, the view suddenly says “align-self”: middle - justify-self: center

type: custom:button-card
styles:
  card:
    - height: 200px
    - width: 300px
custom_fields:
  fart: |
    - align-self: middle
    - justify-self: center
    [[[
      return `<span style="align: center; font-size: 200px">${states['sensor.fart'].state}</span>`
    ]]]
show_icon: false
show_name: false

Edit: I didn’t see your added text above, I have it in the furthest south you can get in Norway, in Mandal. I’m guessing that you are in Sweden, from the “SEK” in your code. :grin:

right, and you don’t know how custom:button-card works :), however it seems like it’s the vertical-stacks which spooking most, could try with custom:vertical-stack-in
I’ve actually not tried this “specific” setup, as what i copied was from an equal sized vertical-stack
So you might be better off using the grid-layout-view, as above i.e

views:
  - theme: noctis-grey
    path: homestatus
    type: custom:grid-layout
    layout:
      grid-template-columns: 33% 67%
      grid-template-areas: |
        "area1 area2"
        "area1 area2"
    cards:
      - type: vertical-stack
        cards:
          - type: custom:button-card
            custom_fields:
              fart: |
                [[[
                  return `<span style="align: center; font-size: 120px">${states['sensor.laundry_temp'].state}</span>`
                ]]]
            show_icon: false
            show_name: false
            styles:
              card:
                - height: 300px
              grid:
                - grid-template-areas: "\"fart\""
                - grid-template-columns: 1fr
          - type: custom:button-card
            custom_fields:
              fart: |
                [[[
                  return `<span style="align: center; font-size: 80px">${states['sensor.workshop_temp'].state}</span>`
                ]]]
            show_icon: false
            show_name: false
            styles:
              card:
                - height: 300px
              grid:
                - grid-template-areas: "\"fart\""
                - grid-template-columns: 1fr
        view_layout:
          grid-area: area1
      - type: vertical-stack
        cards:
          - type: custom:button-card
            custom_fields:
              fart: |
                [[[
                  return `<span style="align: center; font-size: 150px">${states['sensor.panroom_temp'].state}</span>`
                ]]]
            show_icon: false
            show_name: false
            styles:
              card:
                - height: 600px
              grid:
                - grid-template-areas: "\"fart\""
        view_layout:
          grid-area: area2

Play around … with custom:button-card github in another tab :wink:
PS: You might make without using/adding the grid/grid-template-areas in the style of button-card , Just note this grid-template-areas is only inside the button-card,Nothing to do with the View-Grid/grid-areas ( But ofcause you need a basic understanding of Grids) … not that i think this "mess"is fine-tuned … it’s been awhile since i build the foundations to those views i copied from ( ofcause adapted to my various Devices )

Beside those examples above is without my UIX(card-mods on host&card) …Lots just to “fine-tune” :joy:

NOTE: there can be 2 places where i.e custom-fields is represented, 1 is in/under the styles(to style that “area”
The other is where you define what is in this field(of the button-card) there you pic/entity goes(it’s what it shows !)

So that/those (styles) should be under Styles, as i showed in 1 post: styles:>card, grid, custom_fileds , label etc

Enough of fart-ing here :sweat_smile:

Thank you! That was so close to what I want that I’ll set it as a solution! I would prefer to remove the borders and the light grey backing, but I don’t know if that’s just an easy fix? I searched but couldn’t find an all white theme. I adjusted the height to fit the rather low and wide phone I’m going to use it on, so like this:

Ohh i think i have done that in my Theme, cause i dont want them in any Views, but sure UIX might fix it

Depending upon your card and view background color, you can set the border-color to same , or “none”
Maybe “none” will do in your case

border-color: ‘none’

Thou you will still see the Background-color :wink:

background-color: ‘none’ ( or same color as card-background, also for borders )
ha-card-background: ‘#ffffff
card-background-color: ‘var(–ha-card-background)’

Not sure, as i’ve for ages used a theme to align all card-backgrounds/view-background and bordes to same color
As Dev’s have been fiddling around constantly, i’ve added a few and maybe forgot to remove the Redundant settings :joy:

PS: white is #ffffff

In your Theme

paste this:

border-color: 'none'
background-color: '#ffffff'
ha-card-background: '#ffffff'
card-background-color: 'var(--ha-card-background)'

then ur on the safe side

If you only want it in that particular View, you need UIX to “define” this , or simply Load this Specifc Theme into that View ( and use your i.e default Theme in others ) :rofl:

Confused ?, stay tuned, or stop asking :laughing:

First, you didn’t answer when I told you where my boat is and then asked if you are Swedish beause of the SEK in your code in the first message. Or maybe that’s confidential? :wink:

And I have probably reached my incompetence level… I have never tried to create a theme before. I created this in the config.yaml, from this page in the documentation:

frontend:
  themes:
    ingenbord:
      primary-color: pink
      border-color: 'none'
      background-color: '#ffffff'
      ha-card-background: '#ffffff'
      card-background-color: 'var(--ha-card-background)'

And then in the Dashboard:

views:
  - theme: ingenbord
    type: custom:grid-layout
    layout:
      grid-template-columns: 33% 67%
      grid-template-areas: |
        "area1 area2"
        "area1 area2"

Maybe the file should have another name or something?

But at least I found the way to remove the border, even if the bakcground color isn’t all white. But I can probably get around that by adjusting the width of the cards. The correct code to remove borders with card mod is:

styles:
  card:
    - border-style: none

( You seems to have followed the doc, thou i’ve never tried that )

I never tried Themes in configuration.yaml i have separate theme files in a theme-folder , using !include
Home Assistant frontend - Home Assistant .
Did you restart HA after editing your configuration.yaml ?

If so, try to go to your Profile# Themes click to see if you see your Theme there, and apply it

Lastly :wink: Im Danish in heart and soul, but been living in Southern Sweden 38years :slight_smile:

Well, then I was half right about Sweden. Oh, and if I take my boat and go 15 minutes around the island and then keep on going Denmark will be the next land I see!

Activating the theme for all of Hass did work, in the sense that it made everything greyer and the current dashboard in the left menu pink! :joy: So obviously it is doing something. I see now that with the standard theme activated and this theme only on the Sony phone page pink is the accent color when holding the mouse pointer over a tile in edit mode. But the background color stays the same. Anyway, I think I’ll just let the tiles go into each other. So again thanks a lot for the help! Skål med en bajer! :clinking_beer_mugs:

? , maybe Devs have used another “White” … just to piss of people :rofl:

I’ve been in Norway a few times, Oslo, Hemsedal and Solhiesen , skiing and snowboarding ( and close a few times by boat, scubadiving at Väderöarna, and around Smögen )

try to add this

primary-background-color: 'var(–background-color)
secondary-background-color: ‘transparent’

PS: I have no idea how this will affect i.e “white” text, as you know there are “options” for dark/light modes which affect the parts of the default-theme(those as you haven’t defined in your personal Theme)
Best would be for you to find a custom:theme close to what you want, and make it your own(edit here and there)

dunno if these above are still used :laughing:

I hate skiing, but that’s just me. I did some alpine skiing earlier, but I grew tred of it. Now I don’t like to go where I can’t see the sea! :grin:

I tried to add that to the theme, and even (after a bit of searching) ha-view-sections-column-gap: 8px but it doesn’t do anyting, probably because this is a custom grid. And I don’t use dark mode at all, I want everything as white as possible, with dark text. So that’s not a probolem.

Well, it wasn’t like “Yesterday” i was skiing last time :laughing: , and my gear is most like now just “give away or throw away” , i doubt i ever will use it again

There is another " background-color-2: ‘#ffffff’ "
which is reasonable new, not sure where it’s used, but i’ve seen it in many Themes ( so i added it to my also )

But your right about the “margins/gap” i think …
I actually use another custom vertical-stack where you can apply UIX to all cards in the stack , i.e removing/set border radius to 0px, same with paddings and tinkering with margins

- type: custom:vertical-stack-in-card
  horizontal: true
  cards:
    - type: custom:button-card

This is all custom:button-card ( beside the compas-card and moon_phase )
( It’s in 2 columns of a 3 column-grid, and 1st row, 80px high row )(head1 & head2 in above HomeStatus-grid)

ohh and the default native weather card (hard uix styled)