{"record":{"id":"b046484c871e5f7e","repo":"home-assistant/core","slug":"err-b04648","errorCode":null,"errorMessage":"err","messagePattern":"err","errorType":"exception","errorClass":"HomeAssistantError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/automation/config.py","lineNumber":195,"sourceCode":"            if raise_on_errors:\n                raise\n            return _minimal_config(ValidationStatus.FAILED_BLUEPRINT, err, config)\n\n        raw_blueprint_inputs = blueprint_inputs.config_with_inputs\n\n        try:\n            config = blueprint_inputs.async_substitute()\n            raw_config = dict(config)\n        except UndefinedSubstitution as err:\n            if warn_on_errors:\n                LOGGER.error(\n                    \"Blueprint '%s' failed to generate automation with inputs %s: %s\",\n                    blueprint_inputs.blueprint.name,\n                    blueprint_inputs.inputs,\n                    err,\n                )\n            if raise_on_errors:\n                raise HomeAssistantError(err) from err\n            return _minimal_config(ValidationStatus.FAILED_BLUEPRINT, err, config)\n\n    automation_name = \"Unnamed automation\"\n    if isinstance(config, Mapping):\n        if CONF_ALIAS in config:\n            automation_name = f\"Automation with alias '{config[CONF_ALIAS]}'\"\n        elif CONF_ID in config:\n            automation_name = f\"Automation with ID '{config[CONF_ID]}'\"\n\n    try:\n        validated_config = PLATFORM_SCHEMA(config)\n    except vol.Invalid as err:\n        _log_invalid_automation(err, automation_name, \"could not be validated\", config)\n        if raise_on_errors:\n            raise\n        return _minimal_config(ValidationStatus.FAILED_SCHEMA, err, config)\n\n    automation_config = AutomationConfig(validated_config)","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/automation/config.py#L177-L213","documentation":"This error is produced when an automation's blueprint inputs cannot be substituted into the blueprint's configuration; async_substitute() raises UndefinedSubstitution because a required input is missing or references an undefined placeholder. Depending on flags, it is logged (warn_on_errors), re-raised as HomeAssistantError (raise_on_errors), or converted into a minimal failed config with ValidationStatus.FAILED_BLUEPRINT so the automation is not loaded. It originates from Home Assistant's blueprint machinery in homeassistant/helpers/blueprint.py.","triggerScenarios":"Calling automation async_setup or validating a blueprint-based automation config where blueprint_inputs.async_substitute() encounters a placeholder in the blueprint YAML with no corresponding value in the provided inputs; e.g. an input key was renamed in a blueprint update but the automation's stored inputs still use the old key.","commonSituations":"Blueprint author renamed or removed an input that existing automations reference; user hand-edited automations.yaml and dropped an input; blueprint imported from a community repository changed its schema between versions; input nesting (select/selector) mismatches the blueprint's use of !input.","solutions":["Open the failing automation in the UI and compare its inputs against the blueprint's current input definitions; add the missing input(s).","If the blueprint was updated, re-apply it or edit the raw automations.yaml so every !input placeholder used by the blueprint is supplied.","Blueprint authors: give inputs sensible defaults in the blueprint YAML so existing automations keep working after schema changes.","If you rely on programmatic setup, catch HomeAssistantError around setup and inspect err.__cause__ (UndefinedSubstitution) to report which substitution failed."],"exampleFix":"# before (blueprint uses !input notify_service but automation omits it)\ninput: {}\n# after\ninput:\n  notify_service: notify.mobile_app\n","handlingStrategy":"validation","validationCode":"from homeassistant.helpers.blueprint import BlueprintInputs\n\ndef missing_inputs(blueprint_inputs: BlueprintInputs) -> set[str]:\n    import homeassistant.helpers.config_validation as cv\n    # Render the blueprint domain and diff required !input placeholders vs provided inputs\n    raw = blueprint_inputs.blueprint.domain  # blueprint raw config lives on the blueprint object\n    provided = set(blueprint_inputs.inputs)\n    # Use the blueprint's input schema to find required keys without defaults\n    schema = blueprint_inputs.blueprint.metadata.get(\"input\", {})\n    return {k for k, spec in schema.items() if \"default\" not in spec} - provided\n","typeGuard":null,"tryCatchPattern":"from homeassistant.exceptions import HomeAssistantError\nfrom homeassistant.helpers.blueprint import UndefinedSubstitution\n\ntry:\n    config = blueprint_inputs.async_substitute()\nexcept UndefinedSubstitution as err:\n    # report which placeholder/input is missing instead of loading a broken automation\n    report(err)\n","preventionTips":["Give every blueprint input a default so schema changes do not break existing automations.","When updating a community blueprint, diff its input section before pulling the change.","Validate automations.yaml with HA's config checker after manual edits."],"tags":["home-assistant","automation","blueprint","configuration"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}