mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-28 11:36:32 +00:00
@coderabbit: simplify logic
This commit is contained in:
parent
cc03e50329
commit
9a1f7543e7
@ -208,10 +208,7 @@ def get_connection_from_interface(
|
|||||||
wireless = {
|
wireless = {
|
||||||
CONF_ATTR_802_WIRELESS_ASSIGNED_MAC: Variant("s", "preserve"),
|
CONF_ATTR_802_WIRELESS_ASSIGNED_MAC: Variant("s", "preserve"),
|
||||||
CONF_ATTR_802_WIRELESS_MODE: Variant(
|
CONF_ATTR_802_WIRELESS_MODE: Variant(
|
||||||
"s",
|
"s", (interface.wifi and interface.wifi.mode) or "infrastructure"
|
||||||
interface.wifi.mode
|
|
||||||
if interface.wifi and interface.wifi.mode
|
|
||||||
else "infrastructure",
|
|
||||||
),
|
),
|
||||||
CONF_ATTR_802_WIRELESS_POWERSAVE: Variant("i", 1),
|
CONF_ATTR_802_WIRELESS_POWERSAVE: Variant("i", 1),
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user