mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 06:37:52 +00:00
Look for huawei_lte device MACs in a few more device info attributes (#74795)
This commit is contained in:
parent
79b34090e8
commit
430d3e4604
@ -14,7 +14,10 @@ def get_device_macs(
|
|||||||
:param device_info: the device.information structure for the device
|
:param device_info: the device.information structure for the device
|
||||||
:param wlan_settings: the wlan.multi_basic_settings structure for the device
|
:param wlan_settings: the wlan.multi_basic_settings structure for the device
|
||||||
"""
|
"""
|
||||||
macs = [device_info.get("MacAddress1"), device_info.get("MacAddress2")]
|
macs = [
|
||||||
|
device_info.get(x)
|
||||||
|
for x in ("MacAddress1", "MacAddress2", "WifiMacAddrWl0", "WifiMacAddrWl1")
|
||||||
|
]
|
||||||
try:
|
try:
|
||||||
macs.extend(x.get("WifiMac") for x in wlan_settings["Ssids"]["Ssid"])
|
macs.extend(x.get("WifiMac") for x in wlan_settings["Ssids"]["Ssid"])
|
||||||
except Exception: # pylint: disable=broad-except
|
except Exception: # pylint: disable=broad-except
|
||||||
|
Loading…
x
Reference in New Issue
Block a user