From 9d10e42d79e6d460e0fedb53d73c839a9d173c50 Mon Sep 17 00:00:00 2001 From: Sid <27780930+autinerd@users.noreply.github.com> Date: Thu, 16 May 2024 12:16:13 +0200 Subject: [PATCH] Only allow ethernet and wi-fi interfaces as unique ID in webmin (#113084) --- homeassistant/components/webmin/helpers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/webmin/helpers.py b/homeassistant/components/webmin/helpers.py index 6d290183e76..57cf54642ac 100644 --- a/homeassistant/components/webmin/helpers.py +++ b/homeassistant/components/webmin/helpers.py @@ -43,5 +43,7 @@ def get_instance_from_options( def get_sorted_mac_addresses(data: dict[str, Any]) -> list[str]: """Return a sorted list of mac addresses.""" return sorted( - [iface["ether"] for iface in data["active_interfaces"] if "ether" in iface] + iface["ether"] + for iface in data["active_interfaces"] + if "ether" in iface and iface["name"].startswith(("en", "eth", "wl")) )