def activity_name(config, activity_id):
    """Looks up an activity in the config, returning its name.

    Args:
        config (dict): Dictionary object containing configuration information obtained from function ha_get_config.
        activity_id (int): Harmony ID of the activity.

    Returns:
        The name of the activity, or None if not found.
    """

    ids_and_labels = dict([(int(a['id']), a['label']) for a in config['activity']])
    return ids_and_labels.get(int(activity_id))