def _setup_scenario_switches(logger, config, hass):
 scenario = config.get(CONF_SCENARIO)
 if scenario:
  for (_, entity_info) in scenario.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.scenario_switch', name)
   switch = SCSGateScenarioSwitch(name=name, scs_id=scs_id, logger=logger, hass=hass)
   scsgate.SCSGATE.add_device(switch)

def _setup_scenario_switches ( logger , config , hass ) : scenario = config . get ( CONF_SCENARIO ) if scenario : for ( _ , entity_info ) in scenario . 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.scenario_switch' , name ) switch = SCSGateScenarioSwitch ( name = name , scs_id = scs_id , logger = logger , hass = hass ) scsgate . SCSGATE . add_device ( switch )
add only scsgate scenario switches .