def METHOD_NAME(value):
    config = value.copy()
    if CONF_URL not in config:
        try:
            config[CONF_URL], config[CONF_SHA256] = KNOWN_FIRMWARE[config[CONF_VERSION]]
        except KeyError as e:
            raise cv.Invalid(
                f"Firmware {config[CONF_VERSION]} is unknown, please specify an '{CONF_URL}' ..."
            ) from e
    get_firmware(config)
    return config