def _setup_traditional_switches(logger, config, add_devices_callback):
 traditional = config.get(CONF_TRADITIONAL)
 switches = []
 if traditional:
  for (_, entity_info) in traditional.items():
   if (entity_info[scsgate.CONF_SCS_ID] in scsgate.SCSGATE.devices):
    continue
   name = entity_info[CONF_NAME]
   scs_id = entity_info[scsgate.CONF_SCS_ID]
   logger.info('Adding %s scsgate.traditional_switch', name)
   switch = SCSGateSwitch(name=name, scs_id=scs_id, logger=logger)
   switches.append(switch)
 add_devices_callback(switches)
 scsgate.SCSGATE.add_devices_to_register(switches)

def _setup_traditional_switches ( logger , config , add_devices_callback ) : traditional = config . get ( CONF_TRADITIONAL ) switches = [ ] if traditional : for ( _ , entity_info ) in traditional . items ( ) : if ( entity_info [ scsgate . CONF_SCS_ID ] in scsgate . SCSGATE . devices ) : continue name = entity_info [ CONF_NAME ] scs_id = entity_info [ scsgate . CONF_SCS_ID ] logger . info ( 'Adding %s scsgate.traditional_switch' , name ) switch = SCSGateSwitch ( name = name , scs_id = scs_id , logger = logger ) switches . append ( switch ) add_devices_callback ( switches ) scsgate . SCSGATE . add_devices_to_register ( switches )
add traditional scsgate switches .