
Ha Dashboard
- 69 installs
- 14 repo stars
- Updated April 20, 2026
- nodnarbnitram/claude-code-extensions
Helps with ai & agent building tasks during AI-assisted development.
About
ha-dashboard is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.
- ha-dashboard
- AI & Agent Building
- AI-coding skill
Ha Dashboard by the numbers
- 69 all-time installs (skills.sh)
- +1 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #5,786 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/nodnarbnitram/claude-code-extensions --skill ha-dashboardAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 69 |
|---|---|
| repo stars | ★ 14 |
| Last updated | April 20, 2026 |
| Repository | nodnarbnitram/claude-code-extensions ↗ |
What it does
Helps with ai & agent building tasks during AI-assisted development.
Files
Home Assistant Dashboard Skill
Configure Lovelace dashboards, cards, views, and themes for Home Assistant.
Before You Start
This skill prevents 5 common errors and saves ~40% tokens.
| Metric | Without Skill | With Skill |
|---|---|---|
| Setup Time | 30+ min | 10 min |
| Common Errors | 5 | 0 |
| Token Usage | ~8000 | ~4800 |
Known Issues This Skill Prevents
1. YAML indentation errors (must use 2 spaces, never tabs) 2. Invalid entity ID format (must be domain.entity_name) 3. Missing required card properties (e.g., entity for button cards) 4. Incorrect view type configuration 5. Theme variables with wrong syntax
Quick Start
Step 1: Enable YAML Mode (Optional)
# configuration.yaml
lovelace:
mode: yamlWhy this matters: YAML mode gives full control over dashboard configuration and enables version control.
Step 2: Create Basic Dashboard Structure
# ui-lovelace.yaml or dashboards.yaml
title: My Home
views:
- title: Home
path: home
cards:
- type: markdown
content: Welcome to your dashboard!Why this matters: This minimal structure validates your YAML setup before adding complexity.
Step 3: Add Cards to Views
views:
- title: Living Room
path: living-room
cards:
- type: entities
title: Lights
entities:
- light.living_room
- light.kitchen
- type: weather-forecast
entity: weather.home
forecast_type: dailyWhy this matters: Cards are the building blocks of dashboards - start with simple cards before complex ones.
Critical Rules
Always Do
- Use 2-space indentation consistently
- Use entity ID format:
domain.entity_name(e.g.,light.living_room) - Validate YAML before reloading (use an online YAML validator)
- Define
tap_actionfor interactive cards - Test on mobile devices
Never Do
- Use tabs for indentation
- Hardcode entity names that might change
- Create views with 20+ cards (split into multiple views)
- Forget
forecast_typeon weather-forecast cards (required since 2023) - Mix UI-managed and YAML-managed dashboards without understanding the mode
Common Mistakes
Wrong:
type: button
entity:light.living_room
tap_action:
action: toggleCorrect:
type: button
entity: light.living_room
tap_action:
action: toggleWhy: Missing space after colon and incorrect indentation are the most common YAML errors.
Known Issues Prevention
| Issue | Root Cause | Solution |
|---|---|---|
| "Unknown card type" | Missing custom card resource | Add to lovelace.resources |
| Cards not updating | Browser cache | Hard refresh (Ctrl+Shift+R) |
| Theme not applying | Wrong variable name | Check theme variable spelling |
| Blank dashboard | YAML syntax error | Validate YAML, check logs |
| Entity unavailable | Wrong entity ID | Check entity in Developer Tools > States |
Configuration Reference
Dashboard Configuration (configuration.yaml)
lovelace:
mode: yaml # or 'storage' for UI mode
resources:
- url: /local/card.js # Custom card resources
type: module
dashboards:
lovelace-custom:
mode: yaml
title: Custom
icon: mdi:view-dashboard
show_in_sidebar: true
filename: custom-dashboard.yamlKey settings:
mode:yamlfor manual control,storagefor UI editingresources: Load custom cards/CSS (only in YAML mode)dashboards: Define additional dashboards
View Configuration
views:
- title: View Name # Tab title
path: view-path # URL path (/lovelace/view-path)
icon: mdi:home # Tab icon (optional)
type: masonry # masonry, panel, sections, sidebar
theme: dark-mode # Apply specific theme
subview: false # Hide from navigation
cards: [] # Card listCommon Patterns
Horizontal Stack of Buttons
type: horizontal-stack
cards:
- type: button
entity: light.living_room
name: Living
tap_action:
action: toggle
- type: button
entity: light.bedroom
name: Bedroom
tap_action:
action: toggleConditional Card Display
type: conditional
conditions:
- condition: state
entity: binary_sensor.home_occupied
state: "on"
card:
type: entities
title: Home Controls
entities:
- light.living_room
- climate.thermostatBundled Resources
References
Located in references/:
- `card-reference.md` - All built-in card types with YAML examples
- `view-types.md` - View layout comparison and selection guide
- `theme-variables.md` - CSS variables for theming
- `common-patterns.md` - Conditional visibility, stacks, entity rows
Note: For deep dives on specific topics, see the reference files above.
Assets
Located in assets/:
- `dashboard-template.yaml` - Starter dashboard configuration
- `card-snippets.yaml` - Copy-paste card examples
Copy these templates as starting points for your implementation.
Context7 Documentation
For current documentation, use these Context7 library IDs:
| Library ID | Purpose |
|---|---|
/home-assistant/home-assistant.io | User docs - dashboards, cards, views, themes |
/home-assistant/developers.home-assistant | Developer docs - custom card development |
/hacs/documentation | HACS frontend cards |
Official Documentation
Troubleshooting
Dashboard Shows Blank
Symptoms: Dashboard loads but shows nothing or error.
Solution:
# Check Home Assistant logs
ha core logs | grep -i lovelace
# Validate YAML online or locally
python -c "import yaml; yaml.safe_load(open('ui-lovelace.yaml'))"Custom Card Not Loading
Symptoms: "Custom element doesn't exist" error.
Solution:
# Ensure resource is loaded
lovelace:
resources:
- url: /local/my-card.js
type: module # or 'js' for non-module
# Check file exists at /config/www/my-card.jsSetup Checklist
Before using this skill, verify:
- [ ] Home Assistant is running (2023.1+)
- [ ] You have access to configuration files (File Editor or VS Code add-on)
- [ ] You know your entity IDs (check Developer Tools > States)
- [ ] You've decided on YAML vs UI mode for dashboard management
# Card Snippets for Home Assistant Lovelace
# Copy-paste these examples into your dashboard configuration
# Replace entity IDs with your actual entities
# ============================================
# BASIC CARDS
# ============================================
# --- Entities Card ---
# List of entities with optional header toggle
entities_card:
type: entities
title: Living Room
show_header_toggle: true
state_color: true
entities:
- entity: light.living_room
name: Main Light
icon: mdi:ceiling-light
- entity: switch.fan
secondary_info: last-changed
- type: divider
- type: section
label: Climate
- entity: climate.thermostat
# --- Button Card ---
# Single button with tap actions
button_card:
type: button
entity: light.living_room
name: Living Room
icon: mdi:lightbulb
show_name: true
show_icon: true
show_state: true
tap_action:
action: toggle
hold_action:
action: more-info
double_tap_action:
action: call-service
service: light.turn_on
data:
brightness_pct: 100
entity_id: light.living_room
# --- Tile Card ---
# Modern tile with features
tile_card_light:
type: tile
entity: light.living_room
name: Living Room Light
icon: mdi:lightbulb
color: amber
features:
- type: light-brightness
- type: light-color-temp
tile_card_climate:
type: tile
entity: climate.living_room
features:
- type: climate-hvac-modes
hvac_modes:
- heat
- cool
- auto
- "off"
- type: target-temperature
# --- Glance Card ---
# Compact overview of multiple entities
glance_card:
type: glance
title: At a Glance
columns: 4
show_name: true
show_state: true
entities:
- entity: sensor.temperature
name: Temp
- entity: sensor.humidity
name: Humidity
- entity: binary_sensor.motion
show_last_changed: true
- entity: light.bedroom
tap_action:
action: toggle
# --- Gauge Card ---
# Circular gauge with severity colors
gauge_card:
type: gauge
entity: sensor.cpu_usage
name: CPU Usage
unit: "%"
min: 0
max: 100
severity:
green: 0
yellow: 60
red: 80
needle: true
gauge_card_segments:
type: gauge
entity: sensor.battery
name: Battery
segments:
- from: 0
color: red
- from: 20
color: orange
- from: 40
color: yellow
- from: 60
color: green
# ============================================
# WEATHER & CLIMATE
# ============================================
# --- Weather Forecast Card ---
weather_card:
type: weather-forecast
entity: weather.home
show_current: true
show_forecast: true
forecast_type: daily
secondary_info_attribute: humidity
# --- Thermostat Card ---
thermostat_card:
type: thermostat
entity: climate.living_room
features:
- type: climate-hvac-modes
hvac_modes:
- heat
- cool
- auto
- "off"
# ============================================
# MEDIA CARDS
# ============================================
# --- Media Control Card ---
media_card:
type: media-control
entity: media_player.living_room
# --- Picture Entity Card ---
picture_entity_card:
type: picture-entity
entity: camera.front_door
camera_view: live
show_name: true
show_state: true
# --- Picture Glance Card ---
picture_glance_card:
type: picture-glance
title: Living Room
image: /local/images/living-room.jpg
entities:
- entity: light.living_room
- entity: binary_sensor.motion
- entity: sensor.temperature
# ============================================
# INFORMATION CARDS
# ============================================
# --- Markdown Card ---
markdown_card:
type: markdown
title: Welcome
content: |
## Hello {{ user }}!
The temperature is **{{ states('sensor.temperature') }}°C**
{% if is_state('binary_sensor.motion', 'on') %}
Motion detected!
{% endif %}
# --- History Graph Card ---
history_graph_card:
type: history-graph
title: Temperature History
entities:
- entity: sensor.indoor_temp
name: Indoor
- entity: sensor.outdoor_temp
name: Outdoor
hours_to_show: 24
# --- Logbook Card ---
logbook_card:
type: logbook
entities:
- binary_sensor.front_door
- lock.front_door
hours_to_show: 24
# --- Calendar Card ---
calendar_card:
type: calendar
entities:
- calendar.family
- calendar.work
initial_view: listWeek
# --- Map Card ---
map_card:
type: map
entities:
- entity: device_tracker.phone
- entity: zone.home
- entity: zone.work
aspect_ratio: 16:9
default_zoom: 14
dark_mode: true
# ============================================
# LAYOUT CARDS
# ============================================
# --- Horizontal Stack ---
horizontal_stack:
type: horizontal-stack
cards:
- type: button
entity: light.one
tap_action:
action: toggle
- type: button
entity: light.two
tap_action:
action: toggle
- type: button
entity: light.three
tap_action:
action: toggle
# --- Vertical Stack ---
vertical_stack:
type: vertical-stack
cards:
- type: markdown
content: "## Section Title"
- type: entities
entities:
- light.living_room
- type: history-graph
entities:
- sensor.temperature
# --- Grid Card ---
grid_card:
type: grid
columns: 3
square: true
cards:
- type: button
entity: light.one
- type: button
entity: light.two
- type: button
entity: light.three
- type: button
entity: light.four
- type: button
entity: light.five
- type: button
entity: light.six
# ============================================
# CONDITIONAL CARDS
# ============================================
# --- Conditional Card ---
conditional_card:
type: conditional
conditions:
- condition: state
entity: binary_sensor.someone_home
state: "on"
card:
type: entities
title: Home Controls
entities:
- light.living_room
- climate.thermostat
conditional_numeric:
type: conditional
conditions:
- condition: numeric_state
entity: sensor.temperature
above: 25
card:
type: markdown
content: "🔥 It's hot! Temperature is above 25°C"
# --- Entity Filter Card ---
entity_filter_card:
type: entity-filter
entities:
- light.living_room
- light.bedroom
- light.kitchen
- light.bathroom
state_filter:
- "on"
card:
type: glance
title: Lights On
show_empty: false
entity_filter_low_battery:
type: entity-filter
entities:
- sensor.phone_battery
- sensor.tablet_battery
- sensor.laptop_battery
state_filter:
- operator: "<"
value: 20
card:
type: entities
title: Low Battery Devices
# ============================================
# SPECIAL CARDS
# ============================================
# --- Alarm Panel Card ---
alarm_panel_card:
type: alarm-panel
entity: alarm_control_panel.home
states:
- arm_home
- arm_away
- arm_night
# --- Sensor Card with Graph ---
sensor_card:
type: sensor
entity: sensor.temperature
name: Temperature
icon: mdi:thermometer
graph: line
hours_to_show: 24
detail: 2
# --- Statistic Card ---
statistic_card:
type: statistic
entity: sensor.energy_usage
stat_type: sum
period:
calendar:
period: month
name: Energy This Month
# ============================================
# PICTURE ELEMENTS (Floorplan)
# ============================================
picture_elements_card:
type: picture-elements
image: /local/images/floorplan.png
elements:
# State badge
- type: state-badge
entity: binary_sensor.motion_living
style:
top: 30%
left: 40%
# Clickable light icon
- type: state-icon
entity: light.living_room
tap_action:
action: toggle
style:
top: 50%
left: 60%
# Temperature label
- type: state-label
entity: sensor.temperature
style:
top: 70%
left: 20%
color: white
font-size: 16px
# ============================================
# ENTITIES CARD SPECIAL ROWS
# ============================================
entities_special_rows:
type: entities
title: Special Rows Demo
entities:
# Basic entity
- entity: light.living_room
name: Main Light
# Divider
- type: divider
# Section label
- type: section
label: Actions
# Button row
- type: buttons
entities:
- entity: scene.relax
name: Relax
- entity: scene.bright
name: Bright
# Attribute row
- type: attribute
entity: sun.sun
attribute: next_rising
name: Sunrise
icon: mdi:weather-sunset-up
# Call service row
- type: call-service
name: Restart HA
icon: mdi:restart
action_name: Restart
service: homeassistant.restart
confirmation:
text: "Are you sure?"
# Web link row
- type: weblink
name: Home Assistant
url: https://www.home-assistant.io
icon: mdi:home-assistant
# ============================================
# CARD WITH HEADER/FOOTER
# ============================================
card_with_footer:
type: entities
title: Living Room
entities:
- light.living_room
- switch.fan
footer:
type: buttons
entities:
- entity: scene.relax
icon: mdi:sofa
- entity: scene.bright
icon: mdi:brightness-7
card_with_graph_footer:
type: entities
title: Climate
entities:
- climate.thermostat
footer:
type: graph
entity: sensor.temperature
hours_to_show: 24
detail: 2
# Home Assistant Dashboard Template
# Copy this file and customize for your setup
#
# Usage:
# 1. Copy to your Home Assistant config directory
# 2. Rename to ui-lovelace.yaml or dashboards/my-dashboard.yaml
# 3. Replace entity IDs with your actual entities
# 4. Enable YAML mode in configuration.yaml if needed
title: My Home
views:
# ============================================
# HOME VIEW - Overview of your smart home
# ============================================
- title: Home
path: home
icon: mdi:home
cards:
# Welcome message with dynamic content
- type: markdown
content: |
## Welcome Home!
{{ now().strftime('%A, %B %d') }}
# Weather at a glance
- type: weather-forecast
entity: weather.home
forecast_type: daily
show_current: true
show_forecast: true
# Quick status glance
- type: glance
title: At a Glance
columns: 4
show_name: true
show_state: true
entities:
- entity: sensor.indoor_temperature
name: Indoor
- entity: sensor.outdoor_temperature
name: Outdoor
- entity: sensor.humidity
name: Humidity
- entity: binary_sensor.motion
name: Motion
# Main light controls
- type: horizontal-stack
cards:
- type: button
entity: light.living_room
name: Living Room
icon: mdi:sofa
tap_action:
action: toggle
- type: button
entity: light.bedroom
name: Bedroom
icon: mdi:bed
tap_action:
action: toggle
- type: button
entity: light.kitchen
name: Kitchen
icon: mdi:silverware-fork-knife
tap_action:
action: toggle
# ============================================
# LIGHTS VIEW - All lighting controls
# ============================================
- title: Lights
path: lights
icon: mdi:lightbulb-group
cards:
# All lights with toggle
- type: entities
title: All Lights
show_header_toggle: true
state_color: true
entities:
- entity: light.living_room
name: Living Room
icon: mdi:ceiling-light
- entity: light.bedroom
name: Bedroom
icon: mdi:lamp
- entity: light.kitchen
name: Kitchen
icon: mdi:ceiling-light
- type: divider
- type: section
label: Outdoor
- entity: light.porch
name: Porch
icon: mdi:outdoor-lamp
- entity: light.garage
name: Garage
icon: mdi:garage
# Light scenes
- type: entities
title: Scenes
entities:
- type: buttons
entities:
- entity: scene.all_off
name: All Off
icon: mdi:lightbulb-off
- entity: scene.relax
name: Relax
icon: mdi:sofa
- entity: scene.bright
name: Bright
icon: mdi:brightness-7
- entity: scene.movie
name: Movie
icon: mdi:movie
# Lights currently on (dynamic filter)
- type: entity-filter
entities:
- light.living_room
- light.bedroom
- light.kitchen
- light.porch
- light.garage
state_filter:
- "on"
card:
type: glance
title: Lights On
show_empty: false
# ============================================
# CLIMATE VIEW - Temperature and HVAC
# ============================================
- title: Climate
path: climate
icon: mdi:thermostat
cards:
# Main thermostat
- type: thermostat
entity: climate.home
features:
- type: climate-hvac-modes
hvac_modes:
- heat
- cool
- auto
- "off"
# Temperature sensors
- type: horizontal-stack
cards:
- type: gauge
entity: sensor.indoor_temperature
name: Indoor
min: 10
max: 35
severity:
green: 18
yellow: 24
red: 28
- type: gauge
entity: sensor.outdoor_temperature
name: Outdoor
min: -10
max: 40
# Temperature history
- type: history-graph
title: Temperature History
entities:
- entity: sensor.indoor_temperature
name: Indoor
- entity: sensor.outdoor_temperature
name: Outdoor
hours_to_show: 24
# ============================================
# SECURITY VIEW - Locks, cameras, sensors
# ============================================
- title: Security
path: security
icon: mdi:shield-home
cards:
# Alarm panel
- type: alarm-panel
entity: alarm_control_panel.home
states:
- arm_home
- arm_away
- arm_night
# Door and window sensors
- type: entities
title: Doors & Windows
state_color: true
entities:
- entity: binary_sensor.front_door
name: Front Door
icon: mdi:door
- entity: binary_sensor.back_door
name: Back Door
icon: mdi:door
- entity: binary_sensor.garage_door
name: Garage Door
icon: mdi:garage
- type: divider
- entity: lock.front_door
name: Front Lock
- entity: lock.back_door
name: Back Lock
# Recent security events
- type: logbook
title: Recent Activity
entities:
- binary_sensor.front_door
- binary_sensor.back_door
- lock.front_door
- binary_sensor.motion
hours_to_show: 24
# ============================================
# MEDIA VIEW - Entertainment controls
# ============================================
- title: Media
path: media
icon: mdi:television
cards:
# Main media player
- type: media-control
entity: media_player.living_room_tv
# Quick media controls
- type: entities
title: Media Players
entities:
- entity: media_player.living_room_tv
name: Living Room TV
- entity: media_player.bedroom_speaker
name: Bedroom Speaker
- entity: media_player.kitchen_display
name: Kitchen Display
# ============================================
# ENERGY VIEW - Power monitoring
# ============================================
- title: Energy
path: energy
icon: mdi:lightning-bolt
cards:
# Current power usage
- type: gauge
entity: sensor.power_consumption
name: Power Usage
min: 0
max: 10000
unit: W
severity:
green: 0
yellow: 5000
red: 8000
needle: true
# Energy statistics
- type: statistics-graph
title: Daily Energy
entities:
- sensor.daily_energy
stat_types:
- sum
period:
calendar:
period: day
days_to_show: 7
# ============================================
# THEME (Optional)
# ============================================
# Uncomment to apply a custom theme
# background: "center / cover no-repeat url('/local/background.jpg') fixed"
Home Assistant Dashboard Skill
Configure Lovelace dashboards, cards, views, and themes for Home Assistant.
| Status | Active |
| Version | 1.0.0 |
| Last Updated | 2025-12-17 |
| Confidence | 4/5 |
| Production Tested | Home Assistant 2024.x+ |
What This Skill Does
Provides expert guidance for configuring Home Assistant Lovelace dashboards, including card selection, view layouts, theming, and custom card development.
Core Capabilities
- Dashboard and view configuration (Masonry, Panel, Sections, Sidebar layouts)
- Built-in card configuration (40+ card types)
- Theme customization and CSS variables
- Custom card development guidance (LitElement/web components)
- HACS frontend integration recommendations
Auto-Trigger Keywords
Primary Keywords
Exact terms that strongly trigger this skill:
- lovelace
- dashboard
- card
- view
- theme
- panel
Secondary Keywords
Related terms that may trigger in combination:
- tile
- button-card
- mushroom
- mini-graph-card
- entities card
- glance
- gauge
- weather-forecast
- picture-elements
- horizontal-stack
- vertical-stack
- conditional
- yaml mode
Error-Based Keywords
Common error messages that should trigger this skill:
- "Unknown card type"
- "card configuration invalid"
- "Custom element doesn't exist"
- "Invalid YAML"
- "Entity not found"
Known Issues Prevention
| Issue | Root Cause | Solution |
|---|---|---|
| YAML indentation errors | Using tabs or inconsistent spacing | Always use 2-space indentation |
| Unknown card type | Custom card not loaded | Add resource to lovelace.resources |
| Entity unavailable | Incorrect entity ID format | Use domain.entity_name format |
| Theme not applying | Wrong variable name or syntax | Check CSS variable spelling |
| Blank dashboard | YAML syntax error | Validate YAML before reloading |
When to Use
Use This Skill For
- Creating or modifying Lovelace dashboards
- Configuring cards (entities, buttons, tiles, gauges, etc.)
- Setting up view layouts (masonry, panel, sections, sidebar)
- Applying or creating themes
- Developing custom Lovelace cards
- Troubleshooting dashboard display issues
Don't Use This Skill For
- Home Assistant automations and scripts
- Integration setup and configuration
- Backend YAML configuration (not dashboard-related)
- Add-on installation and management
- Entity configuration (device/entity settings)
Quick Usage
# Basic dashboard with entities card
views:
- title: Home
cards:
- type: entities
title: Lights
entities:
- light.living_room
- light.bedroomToken Efficiency
| Approach | Estimated Tokens | Time |
|---|---|---|
| Manual Implementation | ~8000 | 30+ min |
| With This Skill | ~4800 | 10 min |
| Savings | 40% | 20+ min |
File Structure
ha-dashboard/
├── SKILL.md # Detailed instructions and patterns
├── README.md # This file - discovery and quick reference
├── references/ # Supporting documentation
│ ├── card-reference.md # Built-in card YAML examples
│ ├── view-types.md # View layout comparison
│ ├── theme-variables.md # CSS variables for theming
│ └── common-patterns.md # Conditionals, stacks, entity rows
└── assets/
├── dashboard-template.yaml # Starter dashboard config
└── card-snippets.yaml # Copy-paste card configsDependencies
| Package | Version | Verified |
|---|---|---|
| Home Assistant | 2023.1+ | 2025-12-17 |
Official Documentation
Related Skills
ha-automation- Home Assistant automations and scripts (if available)ha-integration- Home Assistant integration setup (if available)
---
License: MIT
Card Reference
Complete reference for Home Assistant Lovelace built-in card types with YAML examples.
Entity Display Cards
Entities Card
Display a list of entities with optional header toggle.
type: entities
title: Living Room
show_header_toggle: true
state_color: true
entities:
- entity: light.living_room
name: Main Light
icon: mdi:ceiling-light
- entity: switch.fan
secondary_info: last-changed
- type: divider
- type: section
label: Climate
- entity: climate.thermostatGlance Card
Compact overview of multiple entities.
type: glance
title: At a Glance
columns: 4
show_name: true
show_state: true
show_icon: true
entities:
- entity: sensor.temperature
name: Temp
- entity: sensor.humidity
name: Humidity
- entity: binary_sensor.motion
show_last_changed: true
- entity: light.bedroom
tap_action:
action: toggleButton Card
Single entity button with customizable actions.
type: button
entity: light.living_room
name: Living Room
icon: mdi:lightbulb
show_name: true
show_icon: true
show_state: true
tap_action:
action: toggle
hold_action:
action: more-info
double_tap_action:
action: call-service
service: light.turn_on
data:
brightness_pct: 100
entity_id: light.living_roomTile Card
Modern entity control with features.
type: tile
entity: light.living_room
name: Living Room Light
icon: mdi:lightbulb
color: amber
show_entity_picture: false
vertical: false
features:
- type: light-brightness
- type: light-color-tempTile Features by Domain:
light:light-brightness,light-color-tempclimate:climate-hvac-modes,target-temperaturecover:cover-open-close,cover-position,cover-tiltfan:fan-speedvacuum:vacuum-commandsselect/input_select:select-optionslawn_mower:lawn-mower-commands
Sensor Card
Sensor with optional graph.
type: sensor
entity: sensor.temperature
name: Temperature
icon: mdi:thermometer
graph: line
hours_to_show: 24
detail: 2Gauge & Statistics Cards
Gauge Card
Circular gauge for numeric values.
type: gauge
entity: sensor.cpu_usage
name: CPU Usage
unit: "%"
min: 0
max: 100
severity:
green: 0
yellow: 60
red: 80
needle: trueGauge with Segments:
type: gauge
entity: sensor.battery
segments:
- from: 0
color: red
- from: 20
color: orange
- from: 40
color: yellow
- from: 60
color: greenStatistic Card
Display statistical values over time.
type: statistic
entity: sensor.energy_usage
stat_type: mean
period:
calendar:
period: month
name: Average Energy This Monthstat_type options: mean, min, max, sum, state, change
Statistics Graph Card
Historical statistics visualization.
type: statistics-graph
title: Energy Statistics
entities:
- sensor.daily_energy
stat_types:
- mean
- min
- max
period:
calendar:
period: day
days_to_show: 7Media Cards
Weather Forecast Card
Weather with forecast display.
type: weather-forecast
entity: weather.home
show_current: true
show_forecast: true
forecast_type: daily
secondary_info_attribute: humidityforecast_type options: daily, hourly, twice_daily
Media Control Card
Media player controls.
type: media-control
entity: media_player.living_roomPicture Card
Static image display.
type: picture
image: /local/images/floorplan.png
tap_action:
action: navigate
navigation_path: /lovelace/floorplanPicture Entity Card
Entity represented by an image.
type: picture-entity
entity: camera.front_door
camera_view: live
show_name: true
show_state: true
tap_action:
action: more-infoPicture Glance Card
Image with entity state overlay.
type: picture-glance
title: Living Room
image: /local/images/living-room.jpg
entities:
- entity: light.living_room
- entity: binary_sensor.motion
- entity: sensor.temperaturePicture Elements Card
Interactive image with positioned elements.
type: picture-elements
image: /local/images/floorplan.png
elements:
- type: state-badge
entity: binary_sensor.motion_living
style:
top: 30%
left: 40%
- type: state-icon
entity: light.living_room
tap_action:
action: toggle
style:
top: 50%
left: 60%
- type: state-label
entity: sensor.temperature
style:
top: 70%
left: 20%
color: whiteInformation Cards
Markdown Card
Render markdown content with templates.
type: markdown
title: Welcome
content: |
## Hello {{ user }}!
The temperature is **{{ states('sensor.temperature') }}°C**
{% if is_state('binary_sensor.motion', 'on') %}
Motion detected!
{% endif %}Logbook Card
Entity history log.
type: logbook
entities:
- binary_sensor.front_door
- lock.front_door
hours_to_show: 24History Graph Card
Historical state graph.
type: history-graph
title: Temperature History
entities:
- entity: sensor.indoor_temp
name: Indoor
- entity: sensor.outdoor_temp
name: Outdoor
hours_to_show: 48Calendar Card
Calendar events display.
type: calendar
entities:
- calendar.family
- calendar.work
initial_view: listWeekMap Card
Entity location map.
type: map
entities:
- entity: device_tracker.phone
- entity: zone.home
- entity: zone.work
aspect_ratio: 16:9
default_zoom: 14
dark_mode: trueIframe Card
Embed external content.
type: iframe
url: https://grafana.local/d/dashboard
aspect_ratio: 16:9Climate Cards
Thermostat Card
Climate control interface.
type: thermostat
entity: climate.living_room
features:
- type: climate-hvac-modes
hvac_modes:
- heat
- cool
- auto
- "off"Humidifier Card
Humidity control.
type: humidifier
entity: humidifier.bedroom
features:
- type: humidifier-modesLayout Cards
Horizontal Stack
Cards side by side.
type: horizontal-stack
cards:
- type: button
entity: light.living_room
- type: button
entity: light.bedroom
- type: button
entity: light.kitchenVertical Stack
Cards stacked vertically.
type: vertical-stack
cards:
- type: entities
entities:
- light.living_room
- type: history-graph
entities:
- sensor.temperatureGrid Card
Grid layout for cards.
type: grid
columns: 3
square: true
cards:
- type: button
entity: light.one
- type: button
entity: light.two
- type: button
entity: light.threeConditional & Filter Cards
Conditional Card
Show card based on conditions.
type: conditional
conditions:
- condition: state
entity: binary_sensor.home_occupied
state: "on"
- condition: numeric_state
entity: sensor.temperature
above: 20
card:
type: entities
entities:
- climate.thermostatEntity Filter Card
Dynamic entity list based on state.
type: entity-filter
entities:
- light.living_room
- light.bedroom
- light.kitchen
- light.bathroom
state_filter:
- "on"
card:
type: glance
title: Lights On
show_empty: falseSpecial Cards
Alarm Panel Card
Alarm control interface.
type: alarm-panel
entity: alarm_control_panel.home
states:
- arm_home
- arm_away
- arm_nightLight Card
Simple light control.
type: light
entity: light.living_room
name: Living Room
icon: mdi:ceiling-lightShopping List Card
Shopping list management.
type: shopping-list
title: Grocery ListTodo List Card
Todo list display.
type: todo-list
entity: todo.shopping
title: Shopping ListEnergy Cards
Energy dashboard cards (require energy integration).
# Energy Distribution
type: energy-distribution
link_dashboard: true
# Energy Usage Graph
type: energy-usage-graph
# Energy Solar Graph
type: energy-solar-graphCard Actions Reference
All cards support these action types:
tap_action:
action: toggle # Toggle entity state
# OR
action: more-info # Open entity dialog
# OR
action: navigate # Navigate to view
navigation_path: /lovelace/bedroom
# OR
action: url # Open URL
url_path: https://example.com
# OR
action: call-service # Call Home Assistant service
service: light.turn_on
data:
entity_id: light.bedroom
brightness_pct: 50
# OR
action: none # Disable actionActions available on most cards:
tap_action- Single tap/clickhold_action- Long press/holddouble_tap_action- Double tap/click
Common Patterns Reference
Frequently used Lovelace dashboard patterns and configurations.
Conditional Visibility
Conditional Card
Show card based on entity state:
type: conditional
conditions:
- condition: state
entity: binary_sensor.someone_home
state: "on"
card:
type: entities
title: Home Controls
entities:
- light.living_room
- climate.thermostatMultiple Conditions (AND)
All conditions must be true:
type: conditional
conditions:
- condition: state
entity: binary_sensor.someone_home
state: "on"
- condition: numeric_state
entity: sun.sun
attribute: elevation
below: 0
card:
type: entities
title: Evening Home
entities:
- light.living_roomState Not Equal
type: conditional
conditions:
- condition: state
entity: alarm_control_panel.home
state_not: disarmed
card:
type: alarm-panel
entity: alarm_control_panel.homeNumeric State Conditions
type: conditional
conditions:
- condition: numeric_state
entity: sensor.temperature
above: 25
card:
type: entities
title: It's Hot!
entities:
- climate.acScreen Width Conditions
type: conditional
conditions:
- condition: screen
media_query: "(min-width: 768px)"
card:
type: entities
title: Desktop Only
entities:
- light.living_roomUser Conditions
type: conditional
conditions:
- condition: user
users:
- user_id_1
- user_id_2
card:
type: entities
title: Admin Only
entities:
- input_boolean.admin_modeEntity Filtering
Entity Filter Card
Dynamic list based on state:
type: entity-filter
entities:
- light.living_room
- light.bedroom
- light.kitchen
- light.bathroom
state_filter:
- "on"
card:
type: glance
title: Lights On
show_empty: falseFilter by Attribute
type: entity-filter
entities:
- sensor.phone_battery
- sensor.tablet_battery
- sensor.laptop_battery
state_filter:
- operator: "<"
value: 20
card:
type: entities
title: Low Battery DevicesFilter Operators
state_filter:
# Exact match
- "on"
# Not equal
- operator: "!="
value: "off"
# Numeric comparisons
- operator: "<"
value: 50
- operator: ">"
value: 100
- operator: "<="
value: 25
- operator: ">="
value: 75
# Regex
- operator: "regex"
value: ".*running.*"Stack Layouts
Horizontal Stack
Cards side by side:
type: horizontal-stack
cards:
- type: button
entity: light.living_room
name: Living
icon: mdi:sofa
tap_action:
action: toggle
- type: button
entity: light.bedroom
name: Bedroom
icon: mdi:bed
tap_action:
action: toggle
- type: button
entity: light.kitchen
name: Kitchen
icon: mdi:silverware-fork-knife
tap_action:
action: toggleVertical Stack
Cards stacked vertically:
type: vertical-stack
cards:
- type: markdown
content: "## Living Room"
- type: entities
entities:
- light.living_room
- switch.living_room_fan
- type: history-graph
entities:
- sensor.living_room_temperature
hours_to_show: 24Nested Stacks
Create complex layouts:
type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: gauge
entity: sensor.temperature
name: Temp
- type: gauge
entity: sensor.humidity
name: Humidity
- type: entities
entities:
- climate.thermostatGrid Layout
type: grid
columns: 3
square: true
cards:
- type: button
entity: light.one
- type: button
entity: light.two
- type: button
entity: light.three
- type: button
entity: light.four
- type: button
entity: light.five
- type: button
entity: light.sixEntity Row Types
Basic Entity Row
type: entities
entities:
- entity: light.living_room
name: Main Light
icon: mdi:ceiling-light
secondary_info: last-changedAttribute Row
Display specific attribute:
type: entities
entities:
- type: attribute
entity: sun.sun
attribute: next_rising
name: Sunrise
icon: mdi:weather-sunset-upButton Row
Multiple buttons in entities card:
type: entities
entities:
- light.living_room
- type: buttons
entities:
- entity: scene.relax
name: Relax
icon: mdi:sofa
- entity: scene.bright
name: Bright
icon: mdi:brightness-7
- entity: scene.movie
name: Movie
icon: mdi:movieCall Service Row
type: entities
entities:
- type: call-service
name: Restart Home Assistant
icon: mdi:restart
action_name: Restart
service: homeassistant.restartDivider and Section
type: entities
entities:
- light.living_room
- light.bedroom
- type: divider
- type: section
label: Climate
- climate.thermostat
- sensor.temperatureWeb Link Row
type: entities
entities:
- type: weblink
name: Home Assistant
url: https://www.home-assistant.io
icon: mdi:home-assistantCustom Secondary Info
type: entities
entities:
- entity: sensor.temperature
secondary_info: last-changed
- entity: light.living_room
secondary_info: last-updated
- entity: media_player.tv
secondary_info: entity-id
- entity: climate.thermostat
secondary_info: attribute
attribute: current_temperatureActions
Tap Actions
# Toggle entity
tap_action:
action: toggle
# Open more info dialog
tap_action:
action: more-info
# Navigate to another view
tap_action:
action: navigate
navigation_path: /lovelace/bedroom
# Open external URL
tap_action:
action: url
url_path: https://example.com
# Call service
tap_action:
action: call-service
service: light.turn_on
data:
entity_id: light.living_room
brightness_pct: 100
color_name: blue
# Do nothing
tap_action:
action: none
# Fire DOM event (for custom cards)
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popupConfirmation Dialog
tap_action:
action: call-service
service: script.dangerous_action
confirmation:
text: "Are you sure you want to run this?"Hold and Double-Tap
tap_action:
action: toggle
hold_action:
action: more-info
double_tap_action:
action: call-service
service: light.turn_on
data:
brightness_pct: 100
entity_id: light.bedroomTemplates in Markdown
Basic Templates
type: markdown
content: |
## Welcome {{ user }}!
The temperature is **{{ states('sensor.temperature') }}°C**
Time: {{ now().strftime('%H:%M') }}Conditionals
type: markdown
content: |
{% if is_state('binary_sensor.door', 'on') %}
**Door is open!**
{% else %}
Door is closed
{% endif %}Loops
type: markdown
content: |
## Lights On:
{% for state in states.light if state.state == 'on' %}
- {{ state.name }}
{% endfor %}Attributes
type: markdown
content: |
Battery: {{ state_attr('sensor.phone', 'battery_level') }}%
Weather: {{ state_attr('weather.home', 'temperature') }}°C,
{{ state_attr('weather.home', 'humidity') }}% humidityCard Header/Footer
Buttons Footer
type: entities
title: Living Room
entities:
- light.living_room
- switch.fan
footer:
type: buttons
entities:
- entity: scene.relax
icon: mdi:sofa
- entity: scene.bright
icon: mdi:brightness-7Graph Footer
type: entities
title: Climate
entities:
- climate.thermostat
footer:
type: graph
entity: sensor.temperature
hours_to_show: 24
detail: 2Picture Header
type: entities
title: Room
header:
type: picture
image: /local/images/room.jpg
tap_action:
action: navigate
navigation_path: /lovelace/room-detail
entities:
- light.roomPicture Elements Patterns
State Badge
type: picture-elements
image: /local/floorplan.png
elements:
- type: state-badge
entity: binary_sensor.motion
style:
top: 30%
left: 40%State Icon with Toggle
- type: state-icon
entity: light.living_room
tap_action:
action: toggle
style:
top: 50%
left: 60%
"--paper-item-icon-color": yellowState Label
- type: state-label
entity: sensor.temperature
style:
top: 70%
left: 20%
color: white
font-size: 16pxConditional Element
- type: conditional
conditions:
- entity: binary_sensor.motion
state: "on"
elements:
- type: icon
icon: mdi:motion-sensor
style:
top: 30%
left: 40%
color: redUtility Patterns
Empty State Message
type: entity-filter
entities:
- light.living_room
- light.bedroom
state_filter:
- "on"
show_empty: true
card:
type: markdown
content: "No lights are on"Loading Placeholder
type: conditional
conditions:
- condition: state
entity: sensor.data
state: unavailable
card:
type: markdown
content: "Loading data..."Responsive Columns
type: glance
columns: 4 # Desktop: 4 columns, mobile: fewer
entities:
- sensor.one
- sensor.two
- sensor.three
- sensor.fourTheme Variables Reference
CSS variables for Home Assistant Lovelace theming.
Theme Configuration
Themes are defined in configuration.yaml:
frontend:
themes:
my_theme:
# Variables go here
primary-color: "#1976D2"Or in a separate themes file:
# configuration.yaml
frontend:
themes: !include_dir_merge_named themes/
# themes/my_theme.yaml
my_theme:
primary-color: "#1976D2"Core Colors
Primary & Accent
primary-color: "#03A9F4" # Main UI color
accent-color: "#FF5722" # Accent/highlight color
primary-text-color: "#212121" # Main text
secondary-text-color: "#727272" # Secondary/muted text
text-primary-color: "#FFFFFF" # Text on primary color backgroundBackground Colors
primary-background-color: "#FAFAFA" # Main background
secondary-background-color: "#FFFFFF" # Cards/surfaces
card-background-color: "#FFFFFF" # Card background
paper-dialog-background-color: "#FFFFFF" # Dialog backgroundDividers & Borders
divider-color: "rgba(0, 0, 0, 0.12)" # Divider lines
disabled-text-color: "#BDBDBD" # Disabled elementsState Colors
Domain-Specific State Colors
# Format: state-{domain}-{state}-color
state-light-on-color: "#FFD700"
state-light-off-color: "#9E9E9E"
state-switch-on-color: "#4CAF50"
state-switch-off-color: "#9E9E9E"
state-cover-open-color: "#2196F3"
state-cover-closed-color: "#9E9E9E"
state-lock-locked-color: "#4CAF50"
state-lock-unlocked-color: "#F44336"
state-binary_sensor-on-color: "#4CAF50"
state-binary_sensor-off-color: "#9E9E9E"Device Class Colors
# Format: state-{domain}-{device_class}-{state}-color
state-binary_sensor-motion-on-color: "#FF9800"
state-binary_sensor-door-on-color: "#F44336"
state-binary_sensor-window-on-color: "#2196F3"
state-sensor-battery-low-color: "#F44336"Generic State Colors
state-icon-color: "#44739E" # Default icon color
state-icon-active-color: "#FDD835" # Active state icon
state-icon-unavailable-color: "#BDBDBD"
state-on-color: "#66BB6A" # Generic on state
state-off-color: "#BDBDBD" # Generic off state
state-unavailable-color: "#BDBDBD"
state-unknown-color: "#9E9E9E"Card Styling
Card Appearance
ha-card-background: "#FFFFFF"
ha-card-border-radius: "12px"
ha-card-border-color: "transparent"
ha-card-border-width: "0px"
ha-card-box-shadow: "0px 2px 4px rgba(0,0,0,0.1)"Card Header
ha-card-header-color: "#212121"
ha-card-header-font-size: "24px"Sidebar Styling
sidebar-background-color: "#FAFAFA"
sidebar-text-color: "#212121"
sidebar-selected-background-color: "rgba(0,0,0,0.08)"
sidebar-selected-icon-color: "#03A9F4"
sidebar-icon-color: "#757575"Header (App Bar)
app-header-background-color: "#03A9F4"
app-header-text-color: "#FFFFFF"
app-header-selection-bar-color: "#FFFFFF"Dashboard Background
# Solid color
lovelace-background: "#E8E8E8"
# Image
lovelace-background: "center / cover no-repeat url('/local/background.jpg') fixed"
# Gradient
lovelace-background: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)"Typography (2025+)
New typography tokens replacing legacy Polymer variables:
# Font families
ha-font-family-body: "Roboto, sans-serif"
ha-font-family-code: "Roboto Mono, monospace"
# Font sizes
ha-font-size-s: "12px"
ha-font-size-m: "14px"
ha-font-size-l: "16px"
ha-font-size-xl: "20px"
ha-font-size-2xl: "24px"
ha-font-size-4xl: "34px"
# Font weights
ha-font-weight-normal: "400"
ha-font-weight-medium: "500"
ha-font-weight-bold: "700"
# Line heights
ha-line-height-condensed: "1.2"
ha-line-height-normal: "1.5"
# Smoothing
ha-font-smoothing: "antialiased"Legacy Variable Migration
| Old Variable | New Variable |
|---|---|
--code-font-family | --ha-font-family-code |
--paper-font-display1_-_font-size | --ha-font-size-4xl |
--paper-font-headline_-_font-size | --ha-font-size-2xl |
--paper-font-title_-_font-size | --ha-font-size-xl |
--paper-font-subhead_-_font-size | --ha-font-size-l |
--paper-font-body1_-_font-size | --ha-font-size-m |
--paper-item-icon-color | --state-icon-color |
Dark Mode
Define dark mode variants within theme:
frontend:
themes:
my_theme:
# Light mode (default)
primary-color: "#1976D2"
primary-background-color: "#FAFAFA"
primary-text-color: "#212121"
modes:
dark:
# Dark mode overrides
primary-color: "#90CAF9"
primary-background-color: "#121212"
primary-text-color: "#E0E0E0"
card-background-color: "#1E1E1E"Complete Theme Example
frontend:
themes:
modern_blue:
# Primary
primary-color: "#1976D2"
accent-color: "#FF5722"
# Text
primary-text-color: "#212121"
secondary-text-color: "#757575"
text-primary-color: "#FFFFFF"
# Backgrounds
primary-background-color: "#F5F5F5"
secondary-background-color: "#FFFFFF"
card-background-color: "#FFFFFF"
# Cards
ha-card-border-radius: "16px"
ha-card-box-shadow: "0 2px 8px rgba(0,0,0,0.08)"
# States
state-light-on-color: "#FFC107"
state-switch-on-color: "#4CAF50"
# Dashboard
lovelace-background: "linear-gradient(180deg, #E3F2FD 0%, #F5F5F5 100%)"
# Dark mode
modes:
dark:
primary-color: "#90CAF9"
primary-text-color: "#E0E0E0"
secondary-text-color: "#9E9E9E"
primary-background-color: "#121212"
secondary-background-color: "#1E1E1E"
card-background-color: "#252525"
ha-card-box-shadow: "0 2px 8px rgba(0,0,0,0.3)"
lovelace-background: "#121212"Per-View Theme
Apply theme to specific view:
views:
- title: Dark Room
theme: my_dark_theme
cards: [...]Per-Card Theme
Apply theme to single card:
- type: entities
theme: my_theme
entities:
- light.living_roomActions
Set Theme via Automation
action: frontend.set_theme
data:
name: my_theme
mode: darkReload Themes
action: frontend.reload_themesTroubleshooting
Theme not applying: 1. Check variable names (no typos) 2. Ensure theme is defined in configuration.yaml 3. Reload themes: Developer Tools > Services > frontend.reload_themes 4. Clear browser cache
Variables not working: 1. CSS variables require -- prefix in CSS, but not in YAML themes 2. Check if variable is supported in your HA version 3. Some variables require specific card types
View Types Reference
Complete guide to Home Assistant Lovelace view layouts with selection criteria.
View Type Comparison
| View Type | Best For | Cards | Layout | Mobile |
|---|---|---|---|---|
| Masonry | General dashboards | Multiple | Auto-columns | Good |
| Panel | Single focus (maps, media) | 1 | Full-width | Excellent |
| Sections | Organized grids | Multiple | Drag-drop grid | Excellent |
| Sidebar | Two-column layouts | Multiple | Main + sidebar | Good |
Masonry View (Default)
Auto-arranging columns that adapt to screen width. Cards flow into columns based on available space.
Best for:
- General-purpose dashboards
- Mixed card types and sizes
- Quick setup without manual positioning
Configuration:
views:
- title: Home
# type: masonry # Optional, this is the default
path: home
icon: mdi:home
cards:
- type: entities
title: Lights
entities:
- light.living_room
- light.bedroom
- type: weather-forecast
entity: weather.home
forecast_type: daily
- type: gauge
entity: sensor.temperature
name: TemperatureBehavior:
- Cards automatically arranged in columns
- Column count adjusts to screen width
- Card order follows YAML order (top-to-bottom, left-to-right)
- Cards with
getCardSize()method influence placement
Panel View
Single card displayed full-width. Perfect for maps, media players, or any content that benefits from maximum space.
Best for:
- Map displays
- Camera feeds
- Large media players
- Custom full-screen cards
Configuration:
views:
- title: Map
type: panel
path: map
icon: mdi:map
cards:
- type: map
entities:
- device_tracker.phone
- zone.home
- zone.work
aspect_ratio: 16:9
default_zoom: 12Important: Panel view only displays the first card. Additional cards are ignored.
Common Panel Cards:
map- Location trackingpicture-elements- Interactive floorplansiframe- Embedded contentmedia-control- Large media playercalendar- Full calendar view
Sections View (New Default)
Grid-based layout with drag-and-drop support in UI mode. Organizes cards into named sections.
Best for:
- Organized, structured dashboards
- Room-by-room layouts
- Mobile-first design
- Users who prefer UI editing
Configuration:
views:
- title: Dashboard
type: sections
path: dashboard
icon: mdi:view-dashboard
max_columns: 4
sections:
- title: Living Room
cards:
- type: tile
entity: light.living_room
- type: tile
entity: climate.living_room
- type: tile
entity: media_player.living_room
- title: Bedroom
cards:
- type: tile
entity: light.bedroom
- type: tile
entity: fan.bedroom
- title: Security
cards:
- type: tile
entity: lock.front_door
- type: tile
entity: binary_sensor.motionSection Options:
sections:
- title: Section Name
type: grid # Default section type
column_span: 2 # Span multiple columns
cards: []Card Grid Options (for custom cards):
// In custom card
getGridOptions() {
return {
rows: 2, // Height in grid units
columns: 6, // Width in grid units (max 6)
min_rows: 1, // Minimum height
max_rows: 4 // Maximum height
};
}Sidebar View
Two-column layout with main content area and sidebar. Useful for dashboards with primary content and supplementary information.
Best for:
- Control panels with status sidebar
- Media dashboards with queue/playlist sidebar
- Room controls with sensor readings sidebar
Configuration:
views:
- title: Overview
type: sidebar
path: overview
icon: mdi:view-split-vertical
cards:
# Main area cards (default position)
- type: weather-forecast
entity: weather.home
forecast_type: daily
- type: entities
title: Quick Controls
entities:
- light.living_room
- climate.thermostat
- media_player.tv
# Sidebar cards (explicit position)
- type: entities
title: Sensors
view_layout:
position: sidebar
entities:
- sensor.temperature
- sensor.humidity
- sensor.air_quality
- type: logbook
view_layout:
position: sidebar
entities:
- binary_sensor.front_door
hours_to_show: 12Card Positioning:
# Place card in sidebar
- type: entities
view_layout:
position: sidebar
entities: [...]
# Place card in main area (default)
- type: entities
view_layout:
position: main
entities: [...]Sidebar Behavior:
- Main area: ~70% width on desktop
- Sidebar: ~30% width on desktop
- Mobile: Sidebar stacks below main content
View Common Properties
All view types share these properties:
views:
- title: View Title # Tab title (required)
path: view-path # URL path (recommended)
icon: mdi:home # Tab icon
theme: theme_name # Apply specific theme
background: /local/bg.jpg # Background image
visible: # Visibility conditions
- user: admin
subview: false # Hide from navigation bar
# Type-specific
type: masonry # masonry, panel, sections, sidebar
cards: [] # Card listVisibility Control
Control who sees a view:
views:
- title: Admin
path: admin
visible:
- user: admin_user_id
- user: another_admin
- title: Guest View
path: guest
visible: false # Hidden from all users in navigationSubviews
Views accessible only via navigation, not in tab bar:
views:
- title: Room Details
path: room-details
subview: true
cards:
- type: entities
entities:
- light.bedroomNavigate to subview:
tap_action:
action: navigate
navigation_path: /lovelace/room-detailsSelection Guide
Choose Masonry when:
- You want quick setup
- Card positions don't matter much
- You have varied card sizes
Choose Panel when:
- You need full-width display
- Showing maps, cameras, or embedded content
- Single-focus views
Choose Sections when:
- You want organized, structured layouts
- You prefer UI-based editing
- Mobile experience is priority
- You're setting up new dashboards (recommended default)
Choose Sidebar when:
- You need two distinct content areas
- Main controls with status/info sidebar
- Desktop-focused dashboards
Migration Tips
From Masonry to Sections: 1. Group related cards conceptually 2. Create sections for each group 3. Move cards into appropriate sections 4. Adjust max_columns for screen width
From UI to YAML: 1. Use three-dot menu > "Raw configuration editor" 2. Copy YAML and save to file 3. Enable YAML mode in configuration.yaml