This add-on simply serves an existing dashboard HTML file inside Home Assistant. Point it at your built index.html, it starts a small server, and Home Assistant shows it via a sidebar entry (Ingress). There's no build step here—just serving the file you already have.
This does expect that you've uploaded your custom dashboard output code to the
config/wwwdirectory of your home assistant instance. If you're using/usednpm create hakit@latestto create your dashboard, it will already be setup to upload your dashboard to the correct location using thenpm run deploycommand.
- Copy this repository url "https://github.com/shannonhochkins/ha-component-kit"
- Navigate to the "Add-ons" section in home assistant
- Click on "Add-on Store"
- In the top right, click on the 3 dots and select "Repositories"
- Paste the url you copied in step 1 into the "Add repository" box and click "Add"
- If you don't see the repo immediately, close and reopen the Add-on Store; then open the new repository and click on "HAKIT"
- Click on "Install" and wait for the installation to complete
- Click "Start" to start the addon, and toggle "Show in sidebar" so it appears in the sidebar
You should now see the "HAKIT Dashboard" option in the sidebar menu which should load your custom dashboard.
NOTE: You may have to change the html_file_path in the configuration tab of the addon.
html_file_path– Relative to your Home Assistantconfigdirectory; defaults towww/ha-dashboard/index.html.spa_mode– If true, all routes fall back to the configured HTML (single-page app); defaults totrue
If html_file_path is invalid, the add-on lists available HTML files under config/www to help you pick the right one. Updates to the HTML are served automatically—no add-on restart needed.
If you're using the deploy functionality from @hakit/ha-component-kit, the dashboard will already be uploaded to the correct location assuming you haven't changed the name of the folder.
- npm i in this repository
- Add a .env file with the following:
VITE_SSH_USERNAME=XX ## eg root
VITE_SSH_PASSWORD=XX ## pw
VITE_SSH_HOSTNAME=XX ## 192.168.1.13
- run
npm run copy-to-ha
This will copy up a development version of the addon, you should see Hakit-dev as an option in the addons store.
Install it, every time you make changes to the addon, simply run npm run copy-to-ha and rebuild the addon in home assistant.
Note: connecting to samba share from mac, Finder -> Connect to server -> smb://homeassistant.local
This will simply spin up a localized version of the addon without connecting to home assistant, easier to update styles etc, Running the dashboard interface for the addon is as simple as running:
- Create an
options.jsonfile under theserverdirectory:
{
"html_file_path": "www/ha-dashboard/index.html",
"spa_mode": true
}npm i && npm run dev- May need to create a "config" directory under the
hakitdirectory containing the file path of thehtml_file_pathoption above.
hakit
server
- options.json
config
- www
- ha-dashboard
- index.html
This will spin up a server under http://localhost:2022