UniFi - Add support for 2.4/5 GHz separated SSIDs (#35062)
parent
4de30ca2ce
commit
221b07595f
|
@ -219,7 +219,12 @@ class UnifiOptionsFlowHandler(config_entries.OptionsFlow):
|
|||
self.options.update(user_input)
|
||||
return await self.async_step_client_control()
|
||||
|
||||
ssid_filter = {wlan: wlan for wlan in self.controller.api.wlans}
|
||||
ssids = list(self.controller.api.wlans) + [
|
||||
f"{wlan.name}{wlan.name_combine_suffix}"
|
||||
for wlan in self.controller.api.wlans.values()
|
||||
if not wlan.name_combine_enabled
|
||||
]
|
||||
ssid_filter = {ssid: ssid for ssid in sorted(ssids)}
|
||||
|
||||
return self.async_show_form(
|
||||
step_id="device_tracker",
|
||||
|
|
|
@ -190,7 +190,7 @@ class UniFiController:
|
|||
elif signal == SIGNAL_DATA and data:
|
||||
|
||||
if DATA_EVENT in data:
|
||||
if data[DATA_EVENT].event in (
|
||||
if next(iter(data[DATA_EVENT])).event in (
|
||||
WIRELESS_CLIENT_CONNECTED,
|
||||
WIRELESS_GUEST_CONNECTED,
|
||||
):
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"name": "Ubiquiti UniFi",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/unifi",
|
||||
"requirements": ["aiounifi==18"],
|
||||
"requirements": ["aiounifi==20"],
|
||||
"codeowners": ["@kane610"],
|
||||
"quality_scale": "platinum"
|
||||
}
|
||||
|
|
|
@ -215,7 +215,7 @@ aiopylgtv==0.3.3
|
|||
aioswitcher==1.1.0
|
||||
|
||||
# homeassistant.components.unifi
|
||||
aiounifi==18
|
||||
aiounifi==20
|
||||
|
||||
# homeassistant.components.wwlln
|
||||
aiowwlln==2.0.2
|
||||
|
|
|
@ -101,7 +101,7 @@ aiopylgtv==0.3.3
|
|||
aioswitcher==1.1.0
|
||||
|
||||
# homeassistant.components.unifi
|
||||
aiounifi==18
|
||||
aiounifi==20
|
||||
|
||||
# homeassistant.components.wwlln
|
||||
aiowwlln==2.0.2
|
||||
|
|
|
@ -31,7 +31,10 @@ from tests.common import MockConfigEntry
|
|||
|
||||
CLIENTS = [{"mac": "00:00:00:00:00:01"}]
|
||||
|
||||
WLANS = [{"name": "SSID 1"}, {"name": "SSID 2"}]
|
||||
WLANS = [
|
||||
{"name": "SSID 1"},
|
||||
{"name": "SSID 2", "name_combine_enabled": False, "name_combine_suffix": "_IOT"},
|
||||
]
|
||||
|
||||
|
||||
async def test_flow_works(hass, aioclient_mock, mock_discovery):
|
||||
|
@ -283,7 +286,7 @@ async def test_advanced_option_flow(hass):
|
|||
CONF_TRACK_CLIENTS: False,
|
||||
CONF_TRACK_WIRED_CLIENTS: False,
|
||||
CONF_TRACK_DEVICES: False,
|
||||
CONF_SSID_FILTER: ["SSID 1"],
|
||||
CONF_SSID_FILTER: ["SSID 1", "SSID 2_IOT"],
|
||||
CONF_DETECTION_TIME: 100,
|
||||
},
|
||||
)
|
||||
|
@ -308,7 +311,7 @@ async def test_advanced_option_flow(hass):
|
|||
CONF_TRACK_CLIENTS: False,
|
||||
CONF_TRACK_WIRED_CLIENTS: False,
|
||||
CONF_TRACK_DEVICES: False,
|
||||
CONF_SSID_FILTER: ["SSID 1"],
|
||||
CONF_SSID_FILTER: ["SSID 1", "SSID 2_IOT"],
|
||||
CONF_DETECTION_TIME: 100,
|
||||
CONF_IGNORE_WIRED_BUG: False,
|
||||
CONF_POE_CLIENTS: False,
|
||||
|
|
Loading…
Reference in New Issue