def METHOD_NAME(component_type: str, source: int, version: int, ip_address: str, num: Optional[int] = None) -> None:
    device_config = AlphaEss()
    device_config.configuration.source = source
    device_config.configuration.version = version
    device_config.configuration.ip_address = ip_address
    dev = Device(device_config)
    if component_type in COMPONENT_TYPE_TO_MODULE:
        component_config = COMPONENT_TYPE_TO_MODULE[component_type].component_descriptor.configuration_factory()
    else:
        raise Exception(
            "illegal component type " + component_type + ". Allowed values: " +
            ','.join(COMPONENT_TYPE_TO_MODULE.keys())
        )
    component_config.id = num
    dev.add_component(component_config)
    log.debug('alpha_ess Version: ' + str(version))
    log.debug('alpha_ess IP-Adresse: ' + str(ip_address))
    dev.update()