Skip to content

fix: tell new_device whether the device is alone on its port - #20

Merged
eizedev merged 2 commits into
mainfrom
fix/shared-port-devices
Oct 30, 2026
Merged

eizedev merged 2 commits into
mainfrom
fix/shared-port-devices

Conversation

@eizedev

@eizedev eizedev commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

new_device named the port where a switch learned a MAC address, also when that port only leads to a router: a phone joining the router's Wi-Fi was "new on port 1". A switch cannot tell the router port by itself here (no LLDP from the router, no routing table over SNMP on the 1920S).

The event now carries devices_on_port and direct (alone on its port). The blueprint gets Only devices plugged in directly (on by default); with it off, shared ports are reported as "seen via port 1 (with 13 other devices)".

Fixes #19

Also: docs/card.md and its screenshot show the card's new link symbol (⇄, managed-switch-card 0.1.1, eizedev/managed-switch-card#9).

Test plan

  • uv run pytest --cov (87 passed, 100 %), uv run mypy, uv run ruff check . pass
  • Blueprint condition and message rendered for direct, shared with and without the option, and events from older versions without direct
  • Every user-facing text is in strings.json and both translations — no new texts
  • No personal data in code, docs or test data
  • Breaking changes: none; existing automations from the blueprint get the new option's default (on), so they stop reporting devices on shared ports
  • CHANGELOG.md, docs/events.md updated

🤖 Generated with Claude Code

eizedev and others added 2 commits October 30, 2026 17:33
A phone joining the router's Wi-Fi was reported as a new device on the port towards the router.
new_device now carries devices_on_port and direct; the blueprint reports only devices plugged in
directly unless turned off, and says "seen via port" otherwise.

Fixes #19

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eizedev
eizedev merged commit 0b9f518 into main Oct 30, 2026
7 checks passed
@eizedev
eizedev deleted the fix/shared-port-devices branch October 30, 2026 16:41
@eizedev eizedev mentioned this pull request Oct 30, 2026
4 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new_device reports Wi-Fi clients of the router on the port towards the router

1 participant