* feat: surface connect URLs for every network interface (#1862)
On a host with several enabled network interfaces (e.g. multiple VLANs),
build_connect_urls only ever showed the single host get_url resolves, so a
client on another interface's subnet had to hand-edit the IP. Enumerate the
enabled adapters' IPv4 addresses (network.async_get_adapters) and emit one
webhook URL and one direct-access URL per address, with the get_url host kept
canonical and first and any repeat deduped away.
IPv4 only: adapter IPv6 addresses carry a %scope_id zone suffix that is not a
usable URL host, and the reported setups are IPv4. Adapter enumeration is
best-effort: any failure degrades to the single get_url host so URL surfacing
(and bring-up) never breaks. No new secret exposure: the extra direct-access
lines reach only the admin-only log and Configure screen, never the
all-users persistent notification.
* fix: declare network after_dependency for adapter enumeration (#1862)
async_get_lan_hosts imports homeassistant.components.network, so hassfest
requires the network integration to be declared. It is a display-only,
exception-guarded lookup that must never fail component setup, so it goes in
after_dependencies (soft ordering) rather than dependencies - matching the
existing guarded-optional cloud import. network is a HA default integration,
so it is always set up before this component.
* test: cover LAN-host forwarding and correct IPv6 rationale (#1862)
Addresses review feedback on PR #1928:
- Assert the bring-up call site forwards the enumerated adapter hosts into
_surface_connect_urls. The kwarg was unasserted, so removing it left every
test green while dropping per-interface URLs from the startup log.
- Correct the async_get_lan_hosts docstring: async_get_adapters returns a bare
IPv6 address with a separate scope_id int; the %scope_id suffix is synthesized
in async_get_enabled_source_ips_from_adapters, not by async_get_adapters.
- Add coverage for two untested branches: the port-less internal URL host swap
and the <home-assistant-ip> placeholder direct-access line.
* style: use ASCII punctuation in the adapter-enumeration docstring (#1862)
The corrected IPv6 rationale used an en-dash, which ruff flags as RUF002
(ambiguous unicode in a docstring). Reword to ASCII punctuation; drop the
same en-dash from the forwarding-test comment for consistency. No behaviour
or wording change beyond punctuation.