Deploy from the command line
If you only want the dashboards, Install from the Marketplace needs no terminal. This page is the other way in: for a deploy you script or run from CI, a Home Assistant that manages its resources in YAML, or the same steps you’ll take later with a skin of your own. Pick one of the two; each registers its own copy.
You don’t need to clone or build anything. The prebuilt bundle holds both skins. A small command-line tool copies it into Home Assistant and creates a dashboard for each skin. After that you change layouts in Home Assistant itself.
CI runs these steps on every change to Dashhaus: it packs the release, installs only @dashhaus/bundle and
@dashhaus/deploy into an empty folder, writes this config and deploys it into a simulated Home Assistant.
What you need
Section titled “What you need”- Home Assistant with an admin user.
- Node.js 22 or newer on the computer you deploy from.
- A way to copy a file into Home Assistant’s
/config/wwwfolder: the Terminal & SSH add-on with your public key in itsauthorized_keys, the Samba add-on’s share mounted on your computer, or a Docker volume.
Deploy
Section titled “Deploy”-
Make a folder for your dashboards and install the bundle and the deploy tool:
Terminal window mkdir my-dashboards && cd my-dashboardsnpm init -ynpm install @dashhaus/bundle @dashhaus/deploy -
Create a
.envfile in that folder with three settings:.env HA_URL=http://homeassistant.local:8123HA_TOKEN=your-long-lived-access-tokenHA_WWW=root@homeassistant.local:/config/wwwSetting What it is For example HA_URLthe address you open Home Assistant at http://homeassistant.local:8123HA_TOKENan admin's token: Profile → Security → Long-lived access tokens <long-lived access token>HA_WWWHome Assistant's /config/www: user@host:/path over SSH, or a mounted folder root@homeassistant.local:/config/wwwHA_SSH_PORT(optional)only when SSH isn't on port 22 22222HA_WWWis an SSH address like the one above, or a local folder such as/Volumes/config/www. Only the deploy tool usesHA_TOKEN; it never goes into the bundle. Keep.envout of version control. -
Create
dashboard.config.mjsnext to it. It names the bundle to upload and the dashboards to create:dashboard.config.mjs import { fileURLToPath } from "node:url";import { bundlePath } from "@dashhaus/bundle";/** @type {import("@dashhaus/deploy/config").DeployConfig} */export default {pageTitle: "Home",bundle: fileURLToPath(bundlePath),dashboards: [{path: "home-orb",title: "Home (Orb)",icon: "mdi:home-variant",async card() {return { card: { type: "custom:dashhaus-orb" }, made: "automatic" };},},{path: "home-field",title: "Home (Field)",icon: "mdi:knob",async card() {return { card: { type: "custom:dashhaus-field" }, made: "automatic" };},},],};Each
pathneeds a hyphen; Home Assistant requires one. Keep only the skin you want if you don’t need both. The@typecomment lets your editor check the file against@dashhaus/deploy/config; the tool doesn’t need it. -
Deploy:
Terminal window npx dashhaus-deploy --skip-buildThe tool copies the bundle into
www/, registers it as a dashboard resource, and creates each dashboard the first time.--skip-buildtells it to use the bundle as installed, since there’s nothing to build. Every step ends in ✓; the last one,Checking that Home Assistant serves it, fetches the file back from Home Assistant, so a wrongHA_WWWshows up here instead of as a blank dashboard.npx dashhaus-deploy --helpprints the options, a config to start from and the.envkeys:Option What it does --config <file>the config to read (default: dashboard.config.mjs in this folder) --skip-buildupload the bundle as it is; use it for @dashhaus/bundle, which has nothing to build --helpthis text -
Reload any Home Assistant tab that was already open, then pick Home (Orb) or Home (Field) in the sidebar.
Home Assistant reads its list of resources when a tab opens. Until you reload, an open tab shows the new dashboard in the sidebar but says “Configuration error” instead of drawing it.
Change the layout
Section titled “Change the layout”A new dashboard lays out every supported entity by area. To choose your own cards, rows and order, open the dashboard and go to ⋮ → Edit dashboard, then the card’s pencil and Show code editor. The preview redraws as you type, and mistakes are listed all together with where they are and what you probably meant:
Dashhaus config has 2 problems:• rows[1].cards[0] (sensor.bedroom_temperature): unknown key "humdity" — did you mean "humidity"?• rows[2].cards[3]: media_player.tv: media_player.* entities have no card yetTo put a Dashhaus card on another dashboard, add Dashhaus from the card picker. It starts from the generated layout for your house. Put it in a Panel view so it gets the full width.
Lay it out in YAML has both skins’ keys, pages and the bottom nav.
Update
Section titled “Update”Update the packages and run the same command again:
npm update @dashhaus/bundle @dashhaus/deploynpx dashhaus-deploy --skip-buildRedeploying replaces the bundle and leaves your dashboards alone, so layouts you edited in Home Assistant are kept. Open tabs pick up the new version when they reload.