Skip to content

Card that shows a switch like its web interface #2

Closed

Description

@eizedev

A Lovelace card (own repository, TypeScript/Lit) that draws a switch's front panel: ports in their real layout (odd/even rows, SFP), coloured by link, speed and PoE, with the connected device on hover or click.

Checked existing cards (2026-10-30): none is vendor-neutral, draws a front panel and finds its entities through the registry instead of entity ID patterns (partach/switch_port_card(_pro), bakerkj's fork, OtisPresley/snmp-switch-manager, bluenazgul/unifi-device-card, juju35/ha-switch-card). Ideas worth taking, with attribution (all MIT): the model layouts of unifi-device-card, the calibrated background image with port positions of snmp-switch-manager.

Data contract the integration already keeps for it: one device per switch, port entities with fixed translation_keys (link, speed, device, poe, received, sent, errors) and unique IDs <switch MAC>_<ifIndex>_<key>; the device sensor carries port, if_index, link, speed. Still needed: a WebSocket command managed_switch/ports with the port layout (number, label, medium RJ45/SFP, row), and per-model layouts with a YAML override.

Activity

  1. added this to the 0.2.0 milestone on Oct 30, 2026
  2. eizedev commented on Oct 30, 2026

    @eizedev
    OwnerAuthor

    Done: managed-switch-card v0.1.0 (HACS, type Dashboard) draws a switch's front panel: ports by link and speed, links to other switches, trunk members, PoE, the device on each port, data rates on request, a click opens the device sensor. It reads the ports through the WebSocket command managed_switch/ports from #18 (0.2.0). Docs: https://ha-managed-switch.eize.dev/card/. Follow-ups are in the card's repository: eizedev/managed-switch-card#6, /7, /8; the link symbol ⇄ comes with eizedev/managed-switch-card#9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestroadmapPlanned work, open for discussion

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions