This guide explains how to test changes to Bubble Card during development.
npm installEdit the source files you want to test.
You need a Home Assistant instance to test your changes. Two options:
Using a local virtual machine keeps your development work isolated from any real setup. Follow the official Home Assistant installation guide to spin up an HAOS instance.
You can also test directly against your own instance. The risk is low, since you are only replacing a frontend resource file.
Once your instance is running, you can for example install the Samba share app (formerly known as add-on) to get file access to the config/www folder over the network:
- In Home Assistant go to Settings → Apps → Install app
- Search for Samba share and install it
- Configure and start it, your config folder will be available on your local network
Important
If Bubble Card is already installed via HACS, remove it first to avoid conflicts: go to HACS, find Bubble Card, click the three-dot menu and select Remove, then clear your browser cache.
Local paths are stored in a .env file that is gitignored and never committed.
- Copy
.env.exampleto.env - Set
HA_PATHto thewwwfolder of your instance (mounted via Samba):
cp .env.example .envThen edit .env:
# macOS / Linux (Samba share mounted as a network volume)
HA_PATH=/Volumes/config/www
# Windows (Samba share mapped as a network drive)
# HA_PATH=\\homeassistant\config\wwwIf HA_PATH is not set, dev builds fall back to the local ./www folder.
After making your changes, run:
npm run distThis builds:
- production files to
dist/ - development files to
HA_PATH(or./wwwif not set)
If this is your first time using a local build, you need to register the file as a dashboard resource:
- Open your dashboard and click the pencil icon (Edit dashboard) in the top-right corner
- Click the three-dot menu and select Manage resources
- Click Add resource
- Paste:
/local/bubble-card.js?v=1 - Select JavaScript module and confirm
On subsequent builds, simply clear the cache in your browser.
Tip
If you are testing in Chrome, enable "Disable cache while DevTools is open" in DevTools → Settings (F1) → Preferences. This ensures every page reload fetches the latest built file automatically.
When your change is ready:
git add .
git commit -m "Your commit message"Include source changes and generated distribution files when required by the project release process.
git push origin your-branch-nameOpen a PR from your branch/fork to the main repository.