From 4681c27f5de024aabdf2e164bd4211d24c719a64 Mon Sep 17 00:00:00 2001 From: autinerd <27780930+autinerd@users.noreply.github.com> Date: Mon, 11 Mar 2024 19:37:36 +0100 Subject: [PATCH] Only allow ethernet and wi-fi interfaces as unique ID in webmin --- 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 6d290183e76967..57cf54642acba1 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")) )