Dashboard YAML Mode in Home Assistant
you can save dashboards/floorplan/picture-elements.yaml directly for Home Assistant to use without going through the UI.
/config/ # HA root config directory (may also be named 'homeassistant')
├── configuration.yaml # Main configuration file
├── secrets.yaml # Sensitive credentials
├── www/ # Folder for local static assets (images, icons, etc.)
│ └── floorplan/2d/floor-whole-2d.png # Maps to '/local/unraid_bg.png' in YAML
└── dashboards/ # Create this folder in the root directory
└── floorplan/2d/
└── floorplan_2d.yaml # Your custom dashboard YAML file,picture-elements.yaml
step 1.Register the Dashboard in configuration.yaml
lovelace:
mode: storage # Keep existing UI-managed dashboards intact
dashboards:
lovelace-unraid: # Unique dashboard ID (must contain a hyphen '-')
mode: yaml
title: Unraid Monitor # Display name in the sidebar
icon: mdi:server # Sidebar icon
show_in_sidebar: true
filename: dashboards/floorplan/2d/floorplan_2d.yaml # Relative path to your YAML file
step 2.Place the File in Your Config Root
Config/dashboards/floorplan/2d/floorplan_2d.yaml # Relative path to your YAML file
title: Unraid
views:
- title: Overview
path: overview
type: panel # Renders the first card full-width (ideal for picture-elements)
cards:
- type: picture-elements
image: /local/floorplan/2d/floor-whole-2d.png # Corresponds to /config/www/unraid_bg.png
elements:
# Add your elements here...
step 3.Restart Home Assistant to load the new sidebar item.
Comments
Be the first to post a comment