def setup_hmdevice_discovery_helper(hass, hmdevicetype, discovery_info, add_callback_devices):
 devices = []
 for config in discovery_info[ATTR_DISCOVER_DEVICES]:
  _LOGGER.debug('Add device %s from config: %s', str(hmdevicetype), str(config))
  new_device = hmdevicetype(hass, config)
  new_device.link_homematic()
  devices.append(new_device)
 add_callback_devices(devices)
 return True

def setup_hmdevice_discovery_helper ( hass , hmdevicetype , discovery_info , add_callback_devices ) : devices = [ ] for config in discovery_info [ ATTR_DISCOVER_DEVICES ] : _LOGGER . debug ( 'Add device %s from config: %s' , str ( hmdevicetype ) , str ( config ) ) new_device = hmdevicetype ( hass , config ) new_device . link_homematic ( ) devices . append ( new_device ) add_callback_devices ( devices ) return True
helper to setup homematic devices with discovery info .