async def test_advanced_option_flow(hass):
    'Test advanced config flow options.'
    controller = (await setup_unifi_integration(hass, clients_response=CLIENTS, devices_response=DEVICES, wlans_response=WLANS, dpigroup_response=DPI_GROUPS, dpiapp_response=[]))
    result = (await hass.config_entries.options.async_init(controller.config_entry.entry_id, context={'show_advanced_options': True}))
    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'], user_input={CONF_TRACK_CLIENTS: False, CONF_TRACK_WIRED_CLIENTS: False, CONF_TRACK_DEVICES: False, CONF_SSID_FILTER: ['SSID 1', 'SSID 2_IOT', 'SSID 3'], CONF_DETECTION_TIME: 100}))
    assert (result['type'] == data_entry_flow.RESULT_TYPE_FORM)
    assert (result['step_id'] == 'client_control')
    result = (await hass.config_entries.options.async_configure(result['flow_id'], user_input={CONF_BLOCK_CLIENT: [CLIENTS[0]['mac']], CONF_POE_CLIENTS: False, CONF_DPI_RESTRICTIONS: False}))
    assert (result['type'] == data_entry_flow.RESULT_TYPE_FORM)
    assert (result['step_id'] == 'statistics_sensors')
    result = (await hass.config_entries.options.async_configure(result['flow_id'], user_input={CONF_ALLOW_BANDWIDTH_SENSORS: True, CONF_ALLOW_UPTIME_SENSORS: True}))
    assert (result['type'] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY)
    assert (result['data'] == {CONF_TRACK_CLIENTS: False, CONF_TRACK_WIRED_CLIENTS: False, CONF_TRACK_DEVICES: False, CONF_SSID_FILTER: ['SSID 1', 'SSID 2_IOT', 'SSID 3'], CONF_DETECTION_TIME: 100, CONF_IGNORE_WIRED_BUG: False, CONF_POE_CLIENTS: False, CONF_DPI_RESTRICTIONS: False, CONF_BLOCK_CLIENT: [CLIENTS[0]['mac']], CONF_ALLOW_BANDWIDTH_SENSORS: True, CONF_ALLOW_UPTIME_SENSORS: True})
Test advanced config flow options.
async def test_advanced_option_flow(hass):
    
    controller = (await setup_unifi_integration(hass, clients_response=CLIENTS, devices_response=DEVICES, wlans_response=WLANS, dpigroup_response=DPI_GROUPS, dpiapp_response=[]))
    result = (await hass.config_entries.options.async_init(controller.config_entry.entry_id, context={'show_advanced_options': True}))
    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'], user_input={CONF_TRACK_CLIENTS: False, CONF_TRACK_WIRED_CLIENTS: False, CONF_TRACK_DEVICES: False, CONF_SSID_FILTER: ['SSID 1', 'SSID 2_IOT', 'SSID 3'], CONF_DETECTION_TIME: 100}))
    assert (result['type'] == data_entry_flow.RESULT_TYPE_FORM)
    assert (result['step_id'] == 'client_control')
    result = (await hass.config_entries.options.async_configure(result['flow_id'], user_input={CONF_BLOCK_CLIENT: [CLIENTS[0]['mac']], CONF_POE_CLIENTS: False, CONF_DPI_RESTRICTIONS: False}))
    assert (result['type'] == data_entry_flow.RESULT_TYPE_FORM)
    assert (result['step_id'] == 'statistics_sensors')
    result = (await hass.config_entries.options.async_configure(result['flow_id'], user_input={CONF_ALLOW_BANDWIDTH_SENSORS: True, CONF_ALLOW_UPTIME_SENSORS: True}))
    assert (result['type'] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY)
    assert (result['data'] == {CONF_TRACK_CLIENTS: False, CONF_TRACK_WIRED_CLIENTS: False, CONF_TRACK_DEVICES: False, CONF_SSID_FILTER: ['SSID 1', 'SSID 2_IOT', 'SSID 3'], CONF_DETECTION_TIME: 100, CONF_IGNORE_WIRED_BUG: False, CONF_POE_CLIENTS: False, CONF_DPI_RESTRICTIONS: False, CONF_BLOCK_CLIENT: [CLIENTS[0]['mac']], CONF_ALLOW_BANDWIDTH_SENSORS: True, CONF_ALLOW_UPTIME_SENSORS: True})