百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
U

unifi-device-card

> 编程语言
开源

适用于 Unifi 设备 (网关 / 交换机 / AP) 的 HA 控制面板卡

99 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

适用于 Unifi 设备 (网关 / 交换机 / AP) 的 HA 控制面板卡

UniFi Device Card

Config Screenshots

UCG-U with show_panel: true (default) [additional used background_opacity: 35]

USW-Lite-16-PoE with force_sequential_port: false (default) [additional used background_opacity: 35 / show_panel: false]

USW-Lite-16-PoE with force_sequential_port: true (optional) [additional used background_opacity: 35 / show_panel: false]

Normal AP Card Layout ap_compact_view: false (default) [additional used background_opacity: 35]

Compact AP Card Layout ap_compact_view: true (optional) [additional used background_opacity: 35]

A Home Assistant Lovelace custom card for UniFi switches, gateways, and access points — built on top of the official UniFi Network Integration.

No direct API access, no extra configuration. Just add the card and pick your device.


Infos

This dashboard is based on my idea, but was created with the help of ChatGPT and only tested with the UniFi devices I own:

  • UCG-U
  • US 8 60W
  • USW Lite 8 PoE
  • USW Lite 16 PoE
  • USW Flex
  • AC Mesh
  • AC Pro
  • U6+
  • U6 Mesh

The idea behind this card was to create a single place to gather the most important information about UniFi devices, so you do not have to open the excellent UniFi app for every small detail. Since there was nothing like this available, I decided to get creative.

I try to save money to get an Cloud Gateway Max in future to replace my Cloud Gateway Ultra, maybe then i could be able to add more feature to the card.

If you see improvements, issues, or fixes, feel free to open an issue or create a pull request.

If you like this project and want to support my work, you can donate via PayPal or buy me a coffee.


Features

  • Realistic front-panel view — ports laid out close to the physical device, including dual-row, six-grid, quad-row, compact gateway, and special WAN/SFP slot layouts, with SFP cages and WAN ports drawn beside their port row where the hardware places them
  • Sections view sizing — the card asks Home Assistant for the width its front panel needs, so a 24 port switch gets a wider card than an access point without any configuration; set grid_options on the card to override. Cards in one row fill the row height, so their bottom edges line up.
  • Device-accurate styling — white panels for Lite / Flex / Ultra / Cloud Gateway style devices and silver/dark panels for rack devices and unknown switch fallbacks
  • Per-port link and PoE indication — visual port LEDs reflect link state, speed class, and active PoE
  • Port detail panel — click any port to see link status, speed, PoE state, PoE power draw, RX/TX values, and available actions; disabling a port requires confirmation
  • Direct device access — click the model and firmware line to open the selected device in Home Assistant, including its disabled entities
  • PoE toggle & Power Cycle — directly from the card when supported by Home Assistant entities
  • Live port counter — connected / total shown in the header chip
  • Automatic device detection — finds UniFi switches and gateways registered in Home Assistant
  • Access Point card mode — AP devices render a dedicated AP panel with online status, uptime, clients, and reboot action (if available)
  • Dedicated AP designs — standard APs stay round, Wall/In-Wall APs and the U6 Extender use a scalable rectangular HTML design, U7 Outdoor models use their matching rounded-rectangle design with a lower status LED, and UniFi 5G Backup uses its own HTML device display
  • Combined In-Wall AP view — compatible In-Wall models can show their integrated switch ports below the normal AP details, with an editor toggle to return to AP-only mode
  • Built-in UI editor — full card configuration without YAML
  • Multi-language support — translations available for English, German, Dutch, French, Spanish, Italian, Swedish, Danish, Norwegian, Finnish, Polish, and Czech
  • Supports renamed entities — port telemetry still works even if entities were renamed in Home Assistant
  • Smarter link detection — falls back to speed, PoE power, and RX/TX traffic when direct port link entities are missing
  • Optional card background color — use the default Home Assistant card background or override it with your own color
  • Advanced color editor step — configure background/title/telemetry/labels/values/model+firmware/port labels/AP colors/button colors with live preview and per-slot reset
  • AP-native card background behavior — AP cards can stay transparent like native Home Assistant cards unless a custom background color is configured

Supported Devices

Model Ports Panel
UniFi Switch Compact 8 (USC8) 8 Silver
UniFi Switch 8 (US8) 8 Silver
UniFi Switch 8 60W (US8P60) 8 Silver
UniFi Switch 8 150W (US8P150) 8 + 2 SFP Silver
UniFi Switch 16 PoE 150W (US16P150) 16 + 2 SFP Silver
USW Flex Mini (USMINI) 4 + Uplink White
USW Flex (USF5P) 4 + Uplink White
USW Flex 2.5G 5 (USWFLEX25G5) 4 + Uplink White
USW Flex 2.5G 8 (USWFLEX25G8) 8 + Uplink + 1 SFP White
USW Flex 2.5G 8 PoE (USWFLEX25G8POE) 8 + Uplink + 1 SFP White
USW Lite 8 PoE (USL8LP, USL8LPB) 8 White
USW Lite 16 PoE (USL16LP, USL16LPB) 16 White
USW 16 PoE (USL16P) 16 + 2 SFP Silver
USW 24 (USL24) 24 + 2 SFP Silver
USW 24 PoE (USL24P, USL24PB, USW24P) 24 + 2 SFP Silver
US-24-250W (US24P250) 24 + 2 SFP Silver
USW 48 (USL48) 48 + 4 SFP Silver
USW 48 PoE (USL48P, USW48P) 48 + 4 SFP Silver
USW Pro 24 PoE (US24PRO) 24 + 2 SFP+ Silver
USW Pro 24 (US24PRO2) 24 + 2 SFP+ Silver
USW Pro 48 PoE (US48PRO) 48 + 4 SFP+ Silver
USW Pro 48 (US48PRO2) 48 + 4 SFP+ Silver
USW Pro Max 16 (USPM16) 16 + 2 SFP+ Silver
USW Pro Max 16 PoE (USPM16P) 16 + 2 SFP+ Silver
USW Pro Max 24 (USPM24) 24 + 2 SFP+ Silver
USW Pro Max 24 PoE (USPM24P) 24 + 2 SFP+ Silver
USW Pro Max 48 (USPM48) 48 + 4 SFP+ Silver
USW Pro Max 48 PoE (USPM48P) 48 + 4 SFP+ Silver
USW Enterprise 8 PoE (US68P) 8 + 2 SFP+ Silver
USW Enterprise 24 PoE (US624P) 24 + 2 SFP+ Silver
USW Enterprise 48 PoE (US648P) 48 + 4 SFP+ Silver
USW Enterprise XG 24 (USXG24) 24 + 2 SFP+ Silver
US-16-XG (USXG) 4 + 12 SFP+ Silver
USW Flex XG (USWFLEXXG) 4 + Uplink White
US XG 6 PoE (USXG6POE) 6 Silver
USW WAN / WAN RJ45 (USWWAN, USWWANRJ45) 4 Silver
USW Mission Critical (USWMISSIONCRITICAL) 9 Silver
USW Industrial (USWINDUSTRIAL) 8 + 2 SFP+ Silver
USW Aggregation (USL8A) 8 SFP+ Silver
USW Pro Aggregation (USAGGPRO) 28 SFP+ + 4 SFP28 Silver
USW Ultra (USWULTRA) 8 White
USW Ultra 60W (USWULTRA60W) 8 White
USW Ultra 210W (USWULTRA210W) 8 White
USW Pro XG 8 PoE (USWPROXG8POE) 8 + 2 SFP+ Silver
USW Pro XG 10 PoE (USWPROXG10POE) 10 + 2 SFP+ Silver
USW Pro XG 24 / 24 PoE (USWPROXG24, USWPROXG24POE) 24 + 2 SFP+ Silver
USW Pro XG 48 / 48 PoE (USWPROXG48, USWPROXG48POE) 48 + 4 SFP+ Silver
USW Pro HD 24 / 24 PoE (USWPROHD24, USWPROHD24POE) 24 + 4 SFP+ Silver
Enterprise Campus 24 PoE / 24S PoE (ECS24POE, ECS24SPOE) 24 + 4 SFP28 Silver
Enterprise Campus 48 PoE / 48S PoE (ECS48POE, ECS48SPOE) 48 + 4 SFP28 Silver
Enterprise Campus Aggregation (ECSAGGREGATION) 32 SFP28 Silver
Enterprise Fortress Gateway (EFG) Gateway ports Silver
Dream Machine Pro Max (UDMPROMAX) 8 + WAN/SFP+ Silver
Dream Machine Beast (UDMBEAST) 8 + WAN/SFP+ Silver
Dream Router 7 (UDR7) 3 + WAN (RJ45) + SFP+ WAN White
Cloud Gateway Ultra (UCGULTRA, UDRULT) 4 + WAN White
Cloud Gateway Max (UCGMAX) 4 + WAN White
Cloud Gateway Fiber (UCGFIBER) 4 + WAN + 2 SFP+ White
Cloud Gateway Industrial (UCGINDUSTRIAL) 4 + WAN + SFP+ White
Dream Machine (UDM) 4 + WAN White
Dream Router (UDR) 4 + WAN White
UDM Pro (UDMPRO) 8 + WAN/SFP+ Silver
UDM SE (UDMPROSE) 8 + WAN/SFP+ Silver
UniFi Express / Express 7 (UX, UX7) LAN + WAN White
Dream Router 5G Max (UDR5GMAX) 4 + WAN White
Dream Wall (UDW) Integrated WiFi + 12 PoE LAN + 2.5 GbE WAN + 2 SFP+ White
UXG Max (UXGMAX) 4 + WAN White
UniFi Travel Router (UTR) LAN + WAN White
UXG-Pro (UXGPRO) 2 + WAN + SFP+ Silver
UXG-Lite (UXGL) 1 + WAN White
UniFi Security Gateway (UGW3) 2 + WAN White
USG Pro 4 (UGW4) 2 + WAN + 2 SFP Silver
USG XG 8 (UGWXG) 8 + WAN Silver

Access Point Designs

Design Explicitly recognized models Display behavior
Round AP UAP, UAP-LR, UAP-Pro, UAP AC/Lite/LR/Pro, nanoHD, HD, XG, SHD, U6 Lite/LR/Pro/Plus/Enterprise, U7 Pro/Pro Max/LR/Lite/Pro XG/Pro XGS Standard scalable circular HTML AP face and safe fallback for unknown APs
Wall / In-Wall UniFi AP In-Wall (UAPIW), UAP AC In-Wall (UAPACIW), UAP AC In-Wall Pro (UAPACIWPRO), UAP In-Wall HD (UAPIWHD), U6 In-Wall (U6IW), U6 Enterprise In-Wall (U6ENTERPRISEIW), U7 Pro Wall (U7PROWALL), U7 In-Wall (U7IW), U7 Pro XG Wall (U7PROXGWALL) Scalable rectangular HTML device face; integrated port section is available only on models that expose switch ports
Mesh column FlexHD, U6 Mesh, U7 Mesh Identical tall, rounded scalable enclosure for all three models, with the LED ring around the top cap
Antenna mesh UAP-Outdoor5 Scalable narrow enclosure with external antennas
AC Mesh UAP AC Mesh Scalable slim capsule enclosure with two long angled antennas
U6 Mesh Pro U6 Mesh Pro Scalable narrow rectangular enclosure with a horizontal front LED
Outdoor panel UAP AC Mesh Pro, UK Ultra Scalable weatherproof panel enclosure
Extender BeaconHD, U6 Extender Scalable wall-plug extender enclosure
Device Bridge Pro Sector UDB-Pro-Sector Scalable tall rounded sector enclosure without a front LED
Building Bridge UBB, UBB XG Scalable circular enclosure with LED status shown as an edge glow and no front LED
Device Bridge UDB Scalable tall enclosure with five vertical front status LEDs and an upper antenna connector
Device Bridge IoT UDB-IoT Scalable compact enclosure with five vertical front status LEDs and a tall upper antenna
Device Bridge Pro UDB-Pro Scalable circular enclosure with LED status shown as an edge glow and no front LED
Bridge U-AirWire, Device Bridge Switch Scalable directional bridge enclosure
E7 E7, U7 Enterprise, E7 Campus Scalable rounded-square enclosure; LED status is rendered as an edge glow because the front has no visible LED
E7 Audience E7-Audience Scalable wide rounded enclosure with a lower center connection and LED edge glow; no front LED is shown
WiFi BaseStation XG UWB-XG Scalable wide enclosure with lower antenna connections and an LED edge glow
U7 Outdoor U7 Outdoor (U7OUTDOOR, UKPW), U7 Pro Outdoor (U7PROOUTDOOR) Dedicated scalable outdoor enclosure with lower status LED
5G Backup UniFi 5G Backup (UMBBE634) Dedicated scalable HTML device and display with signal bars, uptime, CPU, and RAM

Unknown models from the UAP*, U6*, U7*, E7*, UWB*, UDB*, UBB*, UMBB*, UK*, and related AP families fall back to the round AP design.

Unknown switches are auto-detected by port count and use the silver/dark hardware design (#c4c5c8). Explicitly recognized desktop switches use the white design. These are the two UniFi device color variants and are independent of the selected Home Assistant theme.

Notes

  • Access points use reusable, model-specific sca

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScriptcarddashboardhacshome-assistant

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言