Mushroom-style Lovelace card for the unifi_unas Home Assistant integration.
It discovers compatible UniFi Drive / UNAS storage, pool, drive, snapshot, system and
update entities from Home Assistant registry metadata and renders them as one
compact dashboard card.
Built with Codex.
| Compact overview | Snapshot controls |
|---|---|
![]() |
![]() |
| System controls | Updates and diagnostics |
![]() |
![]() |
- Automatic discovery for enabled
unifi_unasentities. - Dynamic grouping for pools, drives, snapshot targets and backup tasks.
- Safe defaults: shutdown/restart stay hidden until
show_dangerous_actionsis enabled. - Width-aware layout: dashboard column changes automatically reorder blocks into vertical or wide views.
- Native controls for switches, buttons, numbers, selects, time entities and updates.
- Home Assistant action support for tap, hold and double tap.
- Visual editor for sections, entity overrides, hidden entities and actions.
- CI-ready TypeScript, lint, Vitest, HACS compatibility and browser smoke tests.
- Live Home Assistant smoke supports install and uninstall checks without committing credentials.
- Install the
unifi_unasintegration in Home Assistant and verify entities are present. - Install this card (HACS is easiest; details below).
- Add a new dashboard card and choose
custom:unifi-drive-card. - If you run multiple UniFi Drive/UNAS devices, set
device_id. - Keep
compact: truefor the default dense layout.
Minimal YAML:
type: custom:unifi-drive-cardMulti-device YAML:
type: custom:unifi-drive-card
device_id: your_home_assistant_device_idRecommended path (HACS):
- Add this repository as a HACS custom repository (Dashboard category).
- Install
Drive Storage Card. - Reload Home Assistant.
- Add the card to your dashboard.
HACS resource entry:
url: /hacsfiles/ha-unifi-drive-card/ha-unifi-drive-card.js
type: moduleManual path:
npm ci
npm run buildCopy dist/ha-unifi-drive-card.js (and optional .map) into:
config/www/community/ha-unifi-drive-card/
Manual resource entry:
url: /local/community/ha-unifi-drive-card/ha-unifi-drive-card.js
type: moduletype: custom:unifi-drive-card
name: UniFi Drive
compact: true
show_unavailable: false
show_optional: false
show_diagnostics: true
show_dangerous_actions: false
show_icon_animations: true
overview_columns: 3
sections:
- overview
- storage
- pools
- drives
- snapshots
- system
- updates
- diagnostics
- actions
tap_action:
action: more-info
hold_action:
action: navigate
navigation_path: /lovelace/unifi-driveCommon options:
| Option | Default | Purpose |
|---|---|---|
device_id |
required | Restricts discovery to one HA device. |
sections |
all sections | Ordered visible sections. |
section_entity_order |
{} |
Optional per-section entity key order override for static key sections (for example storage, system, updates, diagnostics). |
show_dangerous_actions |
false |
Shows restart/shutdown actions with confirmation. |
hide_entities |
[] |
Known entity keys to hide. |
entities |
{} |
Per-key entity overrides. |
compact |
true |
Uses the compact layout by default. |
overview_columns |
3 |
Default overview tile columns, bounded from 1 to 6 and collapsed to one column in very narrow cards. |
The card is responsive to its own dashboard width. Narrow columns render as a vertical card; wider dashboard cards reorder the section blocks so storage, system and update blocks appear earlier in a horizontal dashboard layout, with multi-column entity rows where space allows.
Typical quick tweaks:
- Missing or wrong entity: set
entitiesoverrides for specific keys. - Too much information: trim
sectionsand addhide_entities. - Want power actions: enable
show_dangerous_actions(with confirmation). - Want a roomier card: set
compact: false.
npm run check
npm run render-smoke
npm run anonymization-check
npm run security-auditOptional GitHub-surface anonymization check:
GH_REPO=<owner/repo> \
GITHUB_TOKEN='<github-token>' \
npm run anonymization-check:githubOptional additional runtime blocklist (for user/org-specific anonymization terms) without storing those terms in the repository:
ANONYMIZATION_BLOCKLIST_TERMS='<term1>,<term2>' npm run anonymization-check
ANONYMIZATION_BLOCKLIST_TERMS='<term1>,<term2>' GH_REPO=<owner/repo> GITHUB_TOKEN='<github-token>' npm run anonymization-check:githubLive Home Assistant smoke uses environment variables only:
HA_TEST_URL=http://<ha-host>:8123 \
HA_TEST_USERNAME='<user>' \
HA_TEST_PASSWORD='<password>' \
HA_CARD_DEPLOY_DIR=/path/to/ha/config/www/community/ha-unifi-drive-card \
HA_CARD_CONFIG_DIR=/path/to/ha/config \
npm run smoke:install-uninstallDo not commit hostnames, IPs, tokens, passwords or screenshots with private data.
- Installation
- Configuration
- Troubleshooting
- Development and smoke tests
- Legal notes
- Release process
- 0.3.4 release notes
- 0.3.3 release notes
- 0.3.2 release notes
- 0.3.1 release notes
- 0.3.0 release notes
- 0.2.3 release notes
- 0.2.2 release notes
- 0.2.1 release notes
- Changelog
This project is an independent, MIT-licensed Lovelace custom card. It ships frontend code only and does not include, modify or redistribute UniFi firmware, Home Assistant, HACS, Mushroom, or any vendor cloud service. Users remain responsible for complying with the terms that apply to their own Home Assistant installation, HACS setup, UniFi hardware, UniFi OS installation and local network policies.
The repository avoids vendor logos, copied vendor UI, proprietary type styles, vendor trade dress, private hostnames, internal IP addresses, tokens and credentials in committed files. Screenshots and examples are generated from synthetic or redacted data. Live smoke tests must use environment variables and must not commit secrets.
- Home Assistant provides the dashboard and custom-card platform this card is built for.
- HACS provides the custom repository distribution path used by many Home Assistant installations.
- Mushroom influenced the compact Home Assistant card style referenced in this project description; no Mushroom source code, logos or assets are bundled.
- Ubiquiti and the UniFi product ecosystem provide the compatible storage devices and entities this card can display.
- Lit and the related runtime packages are bundled under their original open-source licenses; see third-party notices.
- Initial implementation and release hardening were built with Codex.
UniFi and Ubiquiti are trademarks or registered trademarks of Ubiquiti Inc. or its affiliates. Home Assistant, HACS and Mushroom are third-party names and may be trademarks or project identifiers of their respective owners. This project is independent and is not affiliated with, sponsored by or endorsed by Ubiquiti, Home Assistant, HACS or Mushroom.
Third-party names are used only for truthful, descriptive compatibility
references. Drive Storage Card is the user-facing project name; repository,
custom element and Home Assistant identifiers such as ha-unifi-drive-card,
unifi-drive-card and unifi_unas are retained for technical compatibility
and should not be read as ownership of any third-party mark.




0 comments
log in to comment.