Home Dashboard Layout PackGuidesFree cards

Room Banner Card

A Lovelace card for Home Assistant: a banner with a heading and a grid of live entity glances. Tap the banner to jump to another view, tap a value to open its more-info dialog. No dependencies, one JavaScript file, a visual editor included.

Room Banner Card screenshot

Free, MIT licensed. Version 1.1.0. Download room-banner-card.js (12 KB)

Manual install (about 2 minutes, no HACS)
  1. Download room-banner-card.js.
  2. Copy it into /config/www/dashpack/ on your Home Assistant (create the folder if needed; restart once if /config/www did not exist).
  3. Turn on Advanced mode in your profile. Then Settings > Dashboards > three dots > Resources > Add resource: URL /local/dashpack/room-banner-card.js, type JavaScript module.
  4. Hard-refresh the browser (Ctrl+Shift+R / Cmd+Shift+R). The card is now available as custom:room-banner-card.

Use

Add the card from the card picker ("Room Banner Card") or in YAML:

type: custom:room-banner-card
heading: [mdi:sofa, Living room]
link: /lovelace/living-room
background: "#2b3a4a"
color: white
row_size: 3
entities:
  - entity: sensor.living_room_temperature
    precision: 1
  - sensor.living_room_humidity
  - entity: person.jude
    map_state:
      home: mdi:home-account
      not_home: Away
  - entity: binary_sensor.motion
    when: "on"
  - entity: light.lamp
    attribute: brightness
    name: Brightness
    unit: /255

Options

KeyTypeDescription
headingstring, list or falseText, or a list mixing text and mdi: icons. false hides it.
linkstringPath (/lovelace/room) or https:// URL opened when the banner is tapped.
backgroundstringAny CSS background: a color, or an image such as url("https://.../a.jpg").
colorstringAny CSS text color. If unset and background is a hex or rgb() color, a light or dark text color is picked for contrast.
row_sizenumber or autoColumns, 1 to 8, or auto (one column per entity). Default 3.
entitieslistEntity ids or objects with the keys below.
entities[].entitystringEntity id.
entities[].namestringOverride the friendly name.
entities[].unitstring or falseOverride the unit, or false to hide it.
entities[].attributestringShow an attribute instead of the state.
entities[].valuestringShow a fixed value instead of the state, for example an mdi: icon.
entities[].precisionnumberDecimal places for numeric values.
entities[].colorstringText color of this glance.
entities[].sizenumberHow many grid cells the glance spans (capped at row_size). media_player entities span the full row.
entities[].imageboolRender the value (an image URL) as a rounded image.
entities[].map_stateobjectMap a state to text, an mdi: icon, or an object overriding value, unit, name and color.
entities[].whenstring or objectShow the entity only when the test passes, see below.
entities[].actionobjectCall a service when the glance is tapped, see below. Without it a tap opens more-info.

CSS variables --banner-card-heading-size and --banner-card-entity-value-size are honored if you set them in your theme.

when

- entity: media_player.office
  when: playing                      # state equals
- entity: light.lamp
  when:
    state: "on"
    attributes:
      brightness: [">", 50]          # operators: =, !=, >, <
- entity: cover.blind
  when:
    state: ["!=", "open", "opening"] # not any of these

A plain value or list means "equals (any of)". An array starting with =, !=, > or < applies that operator. {state: [..], not: true} and {attribute, value} also work.

action

- entity: light.lamp
  name: Reading light
  value: mdi:book-open-page-variant
  action:
    service: light.turn_on
    brightness: 50

The extra keys (or data / service_data) are sent as service data. entity_id defaults to the glance's entity unless you set target or entity_id yourself.

Example dashboard

A small sample view you can paste into the raw configuration editor (replace the placeholder entity ids with your own):

title: Living room
path: living-room
type: sections
max_columns: 2
sections:
  - type: grid
    cards:
      - type: custom:room-banner-card
        heading: [mdi:sofa, Living room]
        link: /lovelace/living-room
        background: "#2b3a4a"
        color: white
        row_size: 3
        entities:
          - entity: sensor.living_room_temperature
            precision: 1
          - sensor.living_room_humidity
          - entity: binary_sensor.living_room_motion
            when: "on"
            map_state:
              "on": mdi:motion-sensor
      - type: tile
        entity: light.living_room
      - type: tile
        entity: media_player.living_room_tv
      - type: tile
        entity: cover.living_room_blinds

8 more ready-made views (living room, bedroom, kitchen, cameras, security, energy, mobile) are in the Home Dashboard Layout Pack ($9): https://dashpack.strahmdigital.com/

Coming from custom:banner-card

Change type: custom:banner-card to type: custom:room-banner-card, remove the old resource, and check each card. These banner-card options work with the same names and behavior:

heading (text, icon list, false), background (including url(...) images), color, link, row_size (number or auto), and per entity entity, name, unit (including false), attribute, value, size, image, map_state (string or object), when (string or object, with =, !=, >, < and attributes) and action (service plus service data).

Differences and not supported:

This card has been tested only against a mocked hass, not a live Home Assistant install, so please report anything that behaves differently.

All free cards · Dashboard guides