A clean, performant, and fully visually configurable room card for Home Assistant. Developed with a focus on stability, simple design, and maximum flexibility.
Collapsed
Editor
- ๐ฑ๏ธ Full visual editor โ no YAML required, with live preview
- ๐ผ๏ธ Built-in image uploader โ upload room backgrounds directly in the editor
- ๐งญ Quick Add โ add buttons from existing entity types in one click, including
select/input_select - ๐ Area-Based Auto-Setup โ pick a Home Assistant area and one click auto-populates climate, controls (light/switch/cover/fan/media_player/lock), temperature/humidity/window/battery sensors
- ๐ฑ๏ธ Drag & drop reordering, bulk expand/collapse, collapsible button entries
Header
- ๐ก๏ธ Smart climate integration โ temperature, humidity and target temp auto-populated
- ๐ Dynamic unit support โ Celsius / Fahrenheit from HA system settings
- ๐ท๏ธ Custom header badges โ any entity with optional label, name toggle and
rgba(...)background - ๐ Configurable header height โ set in px, or
0to hide completely - ๐ซ Hide background image (
show_image: false) โ collapses the header to its content height while keeping name, icon, badges and chips visible - ๐ Image grayscale by light state (
image_entity) โ header image fades to grayscale when the chosen light/switch is off - ๐ถ Presence indicator chip (
presence_sensor) โ green chip when a person / motion / device_tracker is active - ๐จ Configurable alert sensors โ red header chips and red card outline when sensors trip; collapsed mode shows a count badge with click-to-list dialog
- ๐จ Header typography โ font size, weight, style and color per element
- ๐ Header position sliders โ drag title and info line left/right with snap points
- ๐ช Window sensor chips โ custom colors for open/closed states
- ๐ Battery warning chips โ Critical / Low / Empty with card outline
- ๐ง Humidity warning chip โ configurable threshold with card outline
- ๐๏ธ Collapsible card โ click header to collapse/expand, state persists
Buttons
- ๐ Flexible sizing โ width (1/3, 1/4, โฆ) and height per button
- ๐๏ธ Inline slider โ brightness (light), position (cover), temperature (climate), volume (media player)
- ๐ Inline cover buttons โ Open / Stop / Close directly on the tile
โถ๏ธ Media player controls โ transport buttons, volume slider, source/sound-mode chips and optional media title- ๐ฝ Select / Input Select buttons โ add dropdown-style entities and control options with inline Previous / Next buttons
- ๐จ Color Favorites โ tap-to-set RGB swatches on light buttons
- ๐ก Brightness presets โ tap-to-set brightness chips for lights (e.g. 25% / 50% / 75% / 100%)
- ๐ก๏ธ Climate presets โ tap-to-set temperature presets (fixed,
auto,max) - ๐ฅ HVAC mode chips (
show_hvac_modes) โ tappable chips forattributes.hvac_modeswith matching MDI icons (off/auto/heat/cool/heat_cool/dry/fan_only) - ๐จ Fan speed chips (
show_fan_modes) โ tappable chips forattributes.fan_modes - ๐ Sensor sparklines (
show_sparkline) โ tiny line charts on sensor buttons; configurable history (sparkline_hours) and refresh cadence (sparkline_refresh) - ๐ Cover position presets โ tap-to-set position presets (default: 0% / 50% / 100%)
- ๐จ State-dependent colors (
color_map) โ icon color and background by entity state - ๐ก Dynamic state icons โ auto icon per state for Light, Switch, Fan, Lock, Cover, Media Player
- ๐จ Custom icon map (
icon_map) โ per-state icon overrides - ๐ Configurable icon size โ per button or global default
- ๐งผ Show/hide state, label, icon per button
- ๐ Time since last change โ
show_last_changed: trueshows elapsed time on the button (e.g. "2h 15min"), combined with state as "on ยท 2h" โ๏ธ Label position โ Right / Left / Top / Bottom per button and global default- ๐ Configurable actions โ Tap / Hold / Double Tap per button
- ๐งฉ Action service payloads โ
call-serviceactions now support inlineservice_dataJSON in the visual editor - ๐ Nested Card Behavior actions โ action settings are grouped under
Card Behaviorand default to collapsed - ๐ฏ Button visibility toggle
- ๐ด Unavailable / offline handling โ dimmed, non-interactive, with indicator
Advanced
- ๐๏ธ CSS Custom Properties โ
--rc-btn-bg,--rc-icon-colorforcard-modstyling - ๐ Template buttons โ arbitrary HTML content, icon, color and state via Jinja2
- โก Vanilla JS, no external dependencies โ fast load, no build step
Or manually: HACS โ Frontend โ โฎ โ Custom repositories โ paste URL โ Category: Lovelace.
- Download
room-card.jsfrom the latest release - Copy to
/config/www/ - Add resource: URL
/local/room-card.jsยท Type: JavaScript Module
Add the card via "Add Card" โ select OneLine Room Card. The visual editor covers all settings โ no YAML required.
| Option | Default | Description |
|---|---|---|
name |
โ | Room name |
entity |
โ | Main entity (drives header icon color) |
image |
โ | Header background image URL |
show_image |
true |
Show the header background image. false hides the <img> and dark gradient and lets the header collapse to content height while name / icon / badges / chips remain visible |
image_entity |
โ | Light / switch / input_boolean / group entity. When this entity is off, the header image fades to grayscale |
header_height |
120 |
Header image height in px (0 = hidden, ignored when show_image: false) |
collapsible |
false |
Enable click-to-collapse on header |
default_state |
expanded |
expanded ยท collapsed |
tap_action |
โ | Card tap action (e.g. navigate) |
hold_action |
none |
Card hold action |
double_tap_action |
none |
Card double tap action |
global_label_position |
right |
Default label position for all buttons |
global_icon_size |
20px |
Default icon size for all buttons |
global_button_background |
โ | Default button background (e.g. rgba(0,0,0,0)) |
show_card_last_activity |
false |
Show a header badge with elapsed time since the most recently changed button entity (e.g. 5 min, 2h 15min). Auto-refreshes every 60 s. |
sparkline_refresh |
300 |
Auto-refresh cadence for all sparkline buttons in seconds (60โ3600) |
| Option | Default | Description |
|---|---|---|
presence_sensor |
โ | Person / binary_sensor / device_tracker entity. Adds a green presence chip when active (on, home, active, detected) |
presence_sensor_label |
โ | Custom label for the presence chip |
temp_sensor |
โ | Temperature sensor (overrides climate) |
target_temp_sensor |
โ | Target temperature sensor |
humid_sensor |
โ | Humidity sensor (overrides climate) |
temp_sensor_label |
โ | Custom label prefix for the temperature value |
target_temp_sensor_label |
โ | Custom label prefix for the target temperature value |
humid_sensor_label |
โ | Custom label prefix for the humidity value |
humidity_warning_threshold |
60 |
Humidity warning threshold (%) |
alert_sensors |
โ | List of alert configurations: { entity, state, above, below }. Triggers red header chips and a red card outline when active |
alert_chip_mode |
expanded |
expanded shows one chip per active alert; collapsed shows a count badge that opens a list dialog on click |
alert_border_color |
#d32f2d |
CSS color for the red card outline when alerts are active (any valid CSS color) |
window_sensors |
โ | List of window/door sensors (binary_sensor or sensor domain) |
window_labels |
โ | Per-window custom labels keyed by entity ID, e.g. { binary_sensor.bedroom_window: "Sofia's bedroom window" } |
window_always_show |
false |
Show chip even when closed |
window_open_color |
#FFA000 |
Chip color when open |
window_closed_color |
#9E9E9E |
Chip color when closed |
window_solid_background |
false |
Use the resolved window color as a solid chip background instead of a translucent tint |
window_open_states |
["on","open"] |
List of state values treated as "open" (e.g. ["offen","gekippt"] for custom sensors). on is always included automatically for backward compatibility. |
window_state_colors |
โ | Per-state color overrides, e.g. { offen: "#FFA000", gekippt: "#FFD740" } |
battery_sensors |
โ | List of battery sensors |
window_sensors:
- binary_sensor.bedroom_window
window_labels:
binary_sensor.bedroom_window: "Sofia's bedroom window"
window_solid_background: true| Option | Default | Description |
|---|---|---|
entity |
โ | Entity ID |
name |
โ | Display label |
width |
15 |
Relative width (1โ60) |
height |
60 |
Height in px |
control_mode |
โ | slider ยท buttons ยท full (media player full combines volume slider and transport controls) |
color_map |
โ | Per-state icon color map |
icon_map |
โ | Per-state icon map |
show_media_sources |
false |
Show media player source chips from source_list |
show_media_sound_modes |
false |
Show media player sound-mode chips from sound_mode_list |
show_media_title |
false |
Show current media title/artist instead of the raw state |
show_brightness_presets |
false |
Show light brightness preset chips |
brightness_presets |
[25,50,75,100] |
Brightness preset values in percent |
show_cover_presets |
false |
Show cover position preset chips |
cover_presets |
[0,50,100] |
Position preset values |
show_climate_presets |
false |
Show climate temperature preset chips |
climate_presets |
โ | Temperature preset values |
show_hvac_modes |
false |
Show HVAC mode chips for climate entities (uses attributes.hvac_modes, calls climate.set_hvac_mode) |
show_fan_modes |
false |
Show fan speed chips for climate entities (uses attributes.fan_modes, calls climate.set_fan_mode) |
show_sparkline |
false |
Show a small history line chart on sensor buttons |
sparkline_hours |
24 |
Sparkline history range in hours (1โ168) |
show_color_favorites |
false |
Show light color favorite swatches |
color_favorites |
โ | List of #hex or r,g,b colors |
show_state |
true |
Show entity state text on button |
show_last_changed |
false |
Show elapsed time since last state change (e.g. 2h 15min). Combined with show_state renders as on ยท 2h. Auto-refreshes every 60 s. |
tap_action |
more-info |
toggle ยท more-info ยท none |
hold_action |
toggle |
โ |
double_tap_action |
none |
โ |
The button background can be customized on two levels. The specific per-button setting overrides the global setting, which in turn overrides the default theme background.
# Card-level default for all buttons
global_button_background: rgba(0,0,0,0) # e.g., fully transparent
# Per-button override
controls:
- entity: light.living_room
button_background: rgba(128,128,128,0.18) # e.g., slightly tintedPriority: button_background (per button) > global_button_background (all buttons) > theme default
Override via card-mod for advanced theming:
card_mod:
style: |
ha-card {
--rc-btn-bg: rgba(0,0,0,0); /* button background */
--rc-icon-color: white; /* all icon colors */
}Per-button targeting via data-entity attribute (set on each .btn element):
card_mod:
style: |
.btn[data-entity="light.living_room"] {
--rc-btn-bg: rgba(255, 0, 0, 0.5) !important;
--rc-icon-color: gold !important;
}See CHANGELOG.md for the full release history.
If you enjoy this card, consider buying me a coffee!


