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.

Free, MIT licensed. Version 1.1.0. Download room-banner-card.js (12 KB)
- Download room-banner-card.js.
- Copy it into
/config/www/dashpack/on your Home Assistant (create the folder if needed; restart once if/config/wwwdid not exist). - 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. - 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
| Key | Type | Description |
|---|---|---|
heading | string, list or false | Text, or a list mixing text and mdi: icons. false hides it. |
link | string | Path (/lovelace/room) or https:// URL opened when the banner is tapped. |
background | string | Any CSS background: a color, or an image such as url("https://.../a.jpg"). |
color | string | Any CSS text color. If unset and background is a hex or rgb() color, a light or dark text color is picked for contrast. |
row_size | number or auto | Columns, 1 to 8, or auto (one column per entity). Default 3. |
entities | list | Entity ids or objects with the keys below. |
entities[].entity | string | Entity id. |
entities[].name | string | Override the friendly name. |
entities[].unit | string or false | Override the unit, or false to hide it. |
entities[].attribute | string | Show an attribute instead of the state. |
entities[].value | string | Show a fixed value instead of the state, for example an mdi: icon. |
entities[].precision | number | Decimal places for numeric values. |
entities[].color | string | Text color of this glance. |
entities[].size | number | How many grid cells the glance spans (capped at row_size). media_player entities span the full row. |
entities[].image | bool | Render the value (an image URL) as a rounded image. |
entities[].map_state | object | Map a state to text, an mdi: icon, or an object overriding value, unit, name and color. |
entities[].when | string or object | Show the entity only when the test passes, see below. |
entities[].action | object | Call 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:
media_playerentities render as a normal glance (state, name), not banner-card's now-playing layout with title and artwork.- The banner-card CSS variables other than
--banner-card-heading-sizeand--banner-card-entity-value-sizeare not read. - Unknown keys (such as
domain) are ignored. headingis sized 1.3em by default, not 3em; set--banner-card-heading-sizeto match your old look.- New here:
precisionand a visual editor for the basic options.
This card has been tested only against a mocked hass, not a live Home Assistant install, so please report anything that behaves differently.