#Hide elements in mobile view

1 messages · Page 1 of 1 (latest)

glass radish
#

Hi, im using the following:

- type: vertical-stack view_layout: grid-area: sidebar cards: - type: custom:button-card entity: sensor.template_sidebar template: sidebar
is it possible to exclude this part when im in mobile view?
same question for certain elements:

- type: custom:button-card entity: switch.smart_switch_230d0248e1e9cfd972_outlet name: TV Wand template: - light - icon_hue

is it possible to hide them when on mobile view? Thanks !
using lovelace

elder hawk
#

Are you using sections dashboard with UI. Or only yaml?
Try something like:

visibility:
  - condition: screen
    media_query: "(min-width: 0px) and (max-width: 767px)"
#

This is the yaml produced when selecting visibility condition screen phone on Section UI

glass radish
#

only yaml, ill try thanks !

#

- type: vertical-stack view_layout: grid-area: sidebar cards: - type: custom:button-card entity: sensor.template_sidebar template: sidebar visibility: - condition: screen media_query: "(min-width: 1200px)"

#

works like charm, thanks a lot bud !