Bespoke Home Assistant dashboard
A single-file web component, registered as a Home Assistant custom panel, gives full design freedom
(no card limits) while keeping HA's login, live state and services. Templates in assets/panel/ are a
working, generic version of a panel built and refined with a real household; references/ holds what
was learned the hard way.
The template is a starting point, not the deliverable. Every dashboard made with this skill is made to measure: built around this home's real devices, rooms, floor plan, tablet and daily use. Rename, remove, restyle or add sections freely. If the user wants a different look, change the look; keep only the plumbing that solved real problems (loader, keep-awake, lite mode, watch-list redraws).
Work in phases and show the user something at each one — design choices here are personal (fonts, transparency, layout were all changed after seeing them), so short feedback loops beat big reveals.
0. Ask first (one short round)
These four answers change what you build, and the user knows them instantly — ask them together (with a multiple-choice tool if available) before inventorying anything. Skip any the user already answered.
- Which device will show it? — e.g. "Samsung Galaxy Tab A 9.7 with Fully Kiosk", "iPad",
"Fire HD", "other Android tablet", "just a browser / phone". → Picks the device profile in
references/devices/(viewport, lite mode, keep-awake, layout). The Galaxy Tab A profile is field-tested and has a ready preset inassets/presets/. - What floor plan do you have?
- A top-down render or floor-plan image (maybe already in a picture-elements card) → image plan
with simulated lighting (
scripts/make_plan_images.py, references/design.md §5–6). - Nothing ready — start from a simple draft → the agent drafts a clean SVG plan from a photo,
sketch or description and enhances it step by step (
scripts/draft_plan.py,references/floorplan-draft.md). - No plan, just rooms → room tiles / plain blocks; a plan can be added later.
- A top-down render or floor-plan image (maybe already in a picture-elements card) → image plan
with simulated lighting (
- Which extras do you want? (multi-select) — Immich photo screensaver (needs Immich + HA's Immich integration), cameras, alarm, energy/consumption, robot vacuum, washer/dryer.
- How can I reach Home Assistant's
/config? — Samba share, SSH, a file editor add-on, or "I'll copy the files myself". → Decides whether you deploy or hand over files + steps.
Optional, only if it matters for this home: who uses the tablet (adults, kids, guests) and what it is mostly for (a glance on the way out, room control, night light) — it decides what leads the layout.
1. Discover (read before proposing)
- Inventory the home with
scripts/inventory.jinjavia an HA MCPrender_templatetool, the REST/WS API, or Developer tools › Template. Keep outputs small (HA caps template output at ~16 KB). - Look at the current dashboards in a browser and, if you have
/configaccess,.storage/lovelace.*: floor-plan images, plugins like Wallpanel (keep-awake, Immich albums) whose behaviour must survive. - Confirm the tablet from HA if it has a kiosk integration (Fully Kiosk:
sensor.<tablet>_current_page,sensor.<tablet>_screen_orientation,image.<tablet>_screenshot) and read its device profile. - Surface findings worth acting on (offline devices, TRV temperatures that read the radiator, etc.).
Details and data-sanity checks: references/design.md §1.
2. Concepts, then the look
Propose 2–3 distinct concepts as quick visual mockups using real room names and values; let the user
mix them; iterate on background/palette/glass before code. Visual language, tablet layout rules,
floor-plan options and typography: references/design.md.
3. Build the panel from the template
- Copy
assets/panel/home-panel.jsandassets/panel/home-loader.js. - Edit only
DEFAULT_CONFIGat the top: entity ids, rooms (rectfor 3D,areafor the image plan), lamps with real fixture positions, covers, climate, toggles (light: truefor plug-in lamps/trees), cameras grouped per physical camera, scenes mapped to the home's scripts/scenes, Immich album, locale. Keep personal data out of anything you share. - Apply the device profile (
references/devices/): its preset goes inpanel_custom→config:(e.g.assets/presets/galaxy-tab-a-9.7.yaml), and its layout notes tell you what to check. - Floor plan, depending on answer 0.2:
- render →
python3 scripts/make_plan_images.py render.png out/ [--preview lamps.json]; - draft →
python3 scripts/draft_plan.py house.json out/ --level 1(confirm), then--level 2/3; pasteplan-config.jsoninto the rooms (seereferences/floorplan-draft.md).
- render →
- Keep-awake clip for Android kiosks:
scripts/make_awake_video.sh awake.mp4(needs ffmpeg). node --check home-panel.js, then preview by mounting it on a logged-in HA page (see below).
What the template already does (keep it unless asked): day/night theme from sun.sun, status rail,
watch-list redraws, lite mode, room drawer on narrow screens, opaque popups with scrim, consumption
detail, long-press → HA more-info, double-tap alarm, sidebar hide/restore with a ☰ button,
pending/glow/ripple feedback, camera grid with live streams, screensaver that closes on first touch.
4. Deploy
Follow references/deployment.md: copy files to /config/www/home-panel/, back up and edit
configuration.yaml (panel_custom → home-loader.js), run check_config, ask before restarting
HA, then set the kiosk's start URL (Fully Kiosk integration) only if the user asked for it as default.
Verify on the real device via image.<tablet>_screenshot.
5. Optional modules
- Immich screensaver (user creates the API key and adds HA's Immich integration):
references/immich.md. - Cameras, RTSP without stills, live streams in a custom panel:
references/cameras.md.
6. Verify honestly
- Test in a browser at the tablet's viewport and on the device's own screenshot.
- After testing on a new device model, write its profile (template in
references/devices/README.md) so the next build starts from verified settings. - Never toggle real lights, covers, locks or the alarm to test visuals — fake states in the console
(override the panel's
_s()), test only harmless UI (opening a room drawer, popups, screensaver). - Tell the user what you verified and what you did not (e.g. "controls not pressed", "hub offline").
Before declaring done, skim references/pitfalls.md — empty panels after restart, stale cache in the
kiosk, a screen that sleeps after a minute, untappable lit rooms and camera tiles that never load were
all real bugs with known fixes.
Mounting a preview on a live HA page (no deploy)
With a logged-in HA tab open, evaluate the panel source in the page under a unique tag name, then:
const p = document.createElement('home-panel-test-1');
p.style.cssText = 'position:fixed;inset:0;z-index:99999';
p.panel = { config: {} };
document.body.appendChild(p);
p.hass = document.querySelector('home-assistant').hass; // re-assign periodically for live updates
Remove it afterwards. Read-only previews are fine; do not press controls.