Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion homeassistant/components/unifi/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,12 @@ async def async_step_device_tracker(self, user_input=None):
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",
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/unifi/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def async_unifi_signalling_callback(self, signal, data):
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,
):
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/unifi/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ aiopylgtv==0.3.3
aioswitcher==1.1.0

# homeassistant.components.unifi
aiounifi==18
aiounifi==20

# homeassistant.components.wwlln
aiowwlln==2.0.2
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ aiopylgtv==0.3.3
aioswitcher==1.1.0

# homeassistant.components.unifi
aiounifi==18
aiounifi==20

# homeassistant.components.wwlln
aiowwlln==2.0.2
Expand Down
9 changes: 6 additions & 3 deletions tests/components/unifi/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@

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):
Expand Down Expand Up @@ -283,7 +286,7 @@ async def test_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,
},
)
Expand All @@ -308,7 +311,7 @@ async def test_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,
Expand Down