mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-10 10:46:29 +00:00
Fix for bug in host network info collector (#2821)
* Fix for bug in host network info collector Fixed bug in host network info collector (Issue #2779) * Added psk to authentification * Fixed error * Fixed error * Update network.py
This commit is contained in:
parent
37d1a577ef
commit
9e67df26b3
@ -345,14 +345,16 @@ class Interface:
|
|||||||
if inet.type != DeviceType.WIRELESS or not inet.settings:
|
if inet.type != DeviceType.WIRELESS or not inet.settings:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# Authentication
|
# Authentication and PSK
|
||||||
auth = None
|
auth = None
|
||||||
|
psk = None
|
||||||
if not inet.settings.wireless_security:
|
if not inet.settings.wireless_security:
|
||||||
auth = AuthMethod.OPEN
|
auth = AuthMethod.OPEN
|
||||||
if inet.settings.wireless_security.key_mgmt == "none":
|
elif inet.settings.wireless_security.key_mgmt == "none":
|
||||||
auth = AuthMethod.WEP
|
auth = AuthMethod.WEP
|
||||||
elif inet.settings.wireless_security.key_mgmt == "wpa-psk":
|
elif inet.settings.wireless_security.key_mgmt == "wpa-psk":
|
||||||
auth = AuthMethod.WPA_PSK
|
auth = AuthMethod.WPA_PSK
|
||||||
|
psk = inet.settings.wireless_security.psk
|
||||||
|
|
||||||
# WifiMode
|
# WifiMode
|
||||||
mode = WifiMode.INFRASTRUCTURE
|
mode = WifiMode.INFRASTRUCTURE
|
||||||
@ -369,7 +371,7 @@ class Interface:
|
|||||||
mode,
|
mode,
|
||||||
inet.settings.wireless.ssid,
|
inet.settings.wireless.ssid,
|
||||||
auth,
|
auth,
|
||||||
inet.settings.wireless_security.psk,
|
psk,
|
||||||
signal,
|
signal,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user