Gap card with invisible button

Hey

I’m looking for a way to have a clickable gap card with custom height.

Just like this one but one in which I could click on it to perform an action.

Any ideas?

Hello,

Maybe a header card in a section view ?

Capture d'écran 2024-11-27 175045

unfortunately I can’t use sections, it’s the traditional dashboard

Create a standard button with hidden icon/text.
Adjust by card-mod if needed.

the standard button from HA doesn’t allow to set a specific height

I managed to set the height using the custom button card in HACS!
Thanks guys

surely it does with card-mod

I was not able to do and read somewhere else that’s not possible due to the way the height is calculated, can’t remember exactly where.

But if you know how to do it, I would 100% prefer using the built-in card

To do what exactly?
Already said that height may be changed by card-mod.

type: vertical-stack
cards:
  - type: horizontal-stack
    cards:
      - type: entities
        entities:
          - sun.sun
          - sun.sun
          - sun.sun
      - &ref_button
        type: button
        show_name: false
        show_icon: false
        entity: sun.sun
  - <<: *ref_button
    card_mod:
      style: |
        ha-card {
          height: 300px !important;
        }

image

Nice, I was missing the !important!

Guess your “solution” could be now misleading for other users.
Actually, setting a particular height in px is only needed to “restrict” a size; in other cases to adapt a card to a parent’s size “100%” should be used (which is a default for button card).