def request_oauth_completion(hass):
 configurator = get_component('configurator')
 if ('fitbit' in _CONFIGURING):
  configurator.notify_errors(_CONFIGURING['fitbit'], 'Failed to register, please try again.')
  return
 def fitbit_configuration_callback(callback_data):
  'The actions to do when our configuration callback is called.'
 start_url = '{}{}'.format(hass.config.api.base_url, FITBIT_AUTH_START)
 description = 'Please authorize Fitbit by visiting {}'.format(start_url)
 _CONFIGURING['fitbit'] = configurator.request_config(hass, 'Fitbit', fitbit_configuration_callback, description=description, submit_caption='I have authorized Fitbit.')

def request_oauth_completion ( hass ) : configurator = get_component ( 'configurator' ) if ( 'fitbit' in _CONFIGURING ) : configurator . notify_errors ( _CONFIGURING [ 'fitbit' ] , 'Failed to register, please try again.' ) return def fitbit_configuration_callback ( callback_data ) : start_url = '{}{}' . format ( hass . config . api . base_url , FITBIT_AUTH_START ) description = 'Please authorize Fitbit by visiting {}' . format ( start_url ) _CONFIGURING [ 'fitbit' ] = configurator . request_config ( hass , 'Fitbit' , fitbit_configuration_callback , description = description , submit_caption = 'I have authorized Fitbit.' )
request user complete fitbit oauth2 flow .