def validate_config(config):
    """Validate universal media player configuration."""
    del config[CONF_PLATFORM]

    # Validate name
    if CONF_NAME not in config:
        _LOGGER.error('Universal Media Player configuration requires name')
        return False

    validate_children(config)
    validate_commands(config)
    validate_attributes(config)

    del_keys = []
    for key in config:
        if key not in [CONF_NAME, CONF_CHILDREN, CONF_COMMANDS, CONF_ATTRS]:
            _LOGGER.warning(
                'Universal Media Player (%s) unrecognized parameter %s',
                config[CONF_NAME], key)
            del_keys.append(key)
    for key in del_keys:
        del config[key]

    return True
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/media_player/universal.py/validate_config/original