def get_devices_from_config(config, device):
 signal_repetitions = config[CONF_SIGNAL_REPETITIONS]
 devices = []
 for (packet_id, entity_info) in config[CONF_DEVICES].items():
  event = get_rfx_object(packet_id)
  device_id = slugify(event.device.id_string.lower())
  if (device_id in RFX_DEVICES):
   continue
  _LOGGER.info('Add %s rfxtrx', entity_info[ATTR_NAME])
  fire_event = entity_info[ATTR_FIREEVENT]
  datas = {ATTR_STATE: False, ATTR_FIREEVENT: fire_event}
  new_device = device(entity_info[ATTR_NAME], event, datas, signal_repetitions)
  RFX_DEVICES[device_id] = new_device
  devices.append(new_device)
 return devices

def get_devices_from_config ( config , device ) : signal_repetitions = config [ CONF_SIGNAL_REPETITIONS ] devices = [ ] for ( packet_id , entity_info ) in config [ CONF_DEVICES ] . items ( ) : event = get_rfx_object ( packet_id ) device_id = slugify ( event . device . id_string . lower ( ) ) if ( device_id in RFX_DEVICES ) : continue _LOGGER . info ( 'Add %s rfxtrx' , entity_info [ ATTR_NAME ] ) fire_event = entity_info [ ATTR_FIREEVENT ] datas = { ATTR_STATE : False , ATTR_FIREEVENT : fire_event } new_device = device ( entity_info [ ATTR_NAME ] , event , datas , signal_repetitions ) RFX_DEVICES [ device_id ] = new_device devices . append ( new_device ) return devices
read rfxtrx configuration .