pull/135514/head
abmantis 2025-01-20 14:58:48 +00:00
parent 8e6e7ffb1b
commit 5da97db459
1 changed files with 4 additions and 4 deletions

View File

@ -18,22 +18,22 @@ def async_register(
def _format_ips(ips: list[IPv4ConfiguredAddress] | list[IPv6ConfiguredAddress]) -> str:
return ", ".join([f"{ip["address"]}/{ip["network_prefix"]!s}" for ip in ips])
return ", ".join([f"{ip['address']}/{ip['network_prefix']!s}" for ip in ips])
def _get_adapter_ipv4_addresses(adapter: Adapter) -> str:
return f"{adapter["name"]} ({_format_ips(adapter["ipv4"])})"
return f"{adapter['name']} ({_format_ips(adapter['ipv4'])})"
def _get_adapter_ipv6_addresses(adapter: Adapter) -> str:
return f"{adapter["name"]} ({_format_ips(adapter["ipv6"])})"
return f"{adapter['name']} ({_format_ips(adapter['ipv6'])})"
def _get_adapter_info(adapter: Adapter) -> str:
state = "enabled" if adapter["enabled"] else "disabled"
default = ", default" if adapter["default"] else ""
auto = ", auto" if adapter["auto"] else ""
return f"{adapter["name"]} ({state}{default}{auto})"
return f"{adapter['name']} ({state}{default}{auto})"
async def _async_get_announce_addresses(hass: HomeAssistant) -> str: