mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
UniFi - Catch wlan_override without name key (#35366)
This commit is contained in:
parent
ad419911bc
commit
c19b222d5a
@ -240,6 +240,7 @@ class UnifiOptionsFlowHandler(config_entries.OptionsFlow):
|
||||
wlan["name"]
|
||||
for ap in self.controller.api.devices.values()
|
||||
for wlan in ap.wlan_overrides
|
||||
if "name" in wlan
|
||||
}
|
||||
)
|
||||
ssid_filter = {ssid: ssid for ssid in sorted(list(ssids))}
|
||||
|
@ -50,6 +50,17 @@ DEVICES = [
|
||||
"radio_name": "wifi1",
|
||||
"wlan_id": "012345678910111213141516",
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"radio": "na",
|
||||
"radio_name": "wifi1",
|
||||
"wlan_id": "012345678910111213141516",
|
||||
},
|
||||
{
|
||||
"radio": "na",
|
||||
"radio_name": "wifi1",
|
||||
"wlan_id": "012345678910111213141516",
|
||||
},
|
||||
],
|
||||
}
|
||||
]
|
||||
@ -349,6 +360,9 @@ async def test_advanced_option_flow(hass):
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||
assert result["step_id"] == "device_tracker"
|
||||
assert set(
|
||||
result["data_schema"].schema[CONF_SSID_FILTER].options.keys()
|
||||
).intersection(("SSID 1", "SSID 2", "SSID 2_IOT", "SSID 3"))
|
||||
|
||||
result = await hass.config_entries.options.async_configure(
|
||||
result["flow_id"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user