mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-18 14:46:30 +00:00
parent
9264d437b1
commit
7aceb21123
@ -85,7 +85,7 @@
|
||||
},
|
||||
'802-11-wireless-security':
|
||||
{
|
||||
{% if interface.wifi.auth == "web" %}
|
||||
{% if interface.wifi.auth == "wep" %}
|
||||
'auth-alg': <'none'>,
|
||||
'key-mgmt': <'none'>
|
||||
{% elif interface.wifi.auth == "wpa-psk" %}
|
||||
|
@ -22,7 +22,7 @@ class AuthMethod(str, Enum):
|
||||
"""Authentication method."""
|
||||
|
||||
OPEN = "open"
|
||||
WEB = "web"
|
||||
WEP = "wep"
|
||||
WPA_PSK = "wpa-psk"
|
||||
|
||||
|
||||
|
@ -287,8 +287,8 @@ class Interface:
|
||||
return None
|
||||
|
||||
# Authentication
|
||||
if inet.settings.wireless_security.key_mgmt == "none":
|
||||
auth = AuthMethod.WEB
|
||||
if inet.settings.wireless_security.auth_alg == "none":
|
||||
auth = AuthMethod.WEP
|
||||
elif inet.settings.wireless_security.key_mgmt == "wpa-psk":
|
||||
auth = AuthMethod.WPA_PSK
|
||||
else:
|
||||
|
@ -124,7 +124,7 @@ async def test_interface_update_payload_wireless_web(coresys):
|
||||
|
||||
interface.type = InterfaceType.WIRELESS
|
||||
interface.wifi = WifiConfig(
|
||||
WifiMode.INFRASTRUCTURE, "Test", AuthMethod.WEB, "password", 0
|
||||
WifiMode.INFRASTRUCTURE, "Test", AuthMethod.WEP, "password", 0
|
||||
)
|
||||
|
||||
data = interface_update_payload(interface)
|
||||
|
Loading…
x
Reference in New Issue
Block a user