{"record":{"id":"90d0e475c0479fd7","repo":"home-assistant/core","slug":"failed-to-load-blueprint-unable-to-find-blueprin","errorCode":null,"errorMessage":"Failed to load blueprint: Unable to find {blueprint_path}","messagePattern":"Failed to load blueprint: Unable to find (.+?)","errorType":"exception","errorClass":"FailedToLoad","httpStatus":null,"severity":"error","filePath":"homeassistant/components/blueprint/models.py","lineNumber":230,"sourceCode":"\n    @property\n    def blueprint_folder(self) -> pathlib.Path:\n        \"\"\"Return the blueprint folder.\"\"\"\n        return pathlib.Path(self.hass.config.path(BLUEPRINT_FOLDER, self.domain))\n\n    async def async_reset_cache(self) -> None:\n        \"\"\"Reset the blueprint cache.\"\"\"\n        async with self._load_lock:\n            self._blueprints = {}\n\n    def _load_blueprint(self, blueprint_path: str) -> Blueprint:\n        \"\"\"Load a blueprint.\"\"\"\n        try:\n            blueprint_data = yaml_util.load_yaml_dict(\n                self.blueprint_folder / blueprint_path\n            )\n        except FileNotFoundError as err:\n            raise FailedToLoad(\n                self.domain,\n                blueprint_path,\n                FileNotFoundError(f\"Unable to find {blueprint_path}\"),\n            ) from err\n        except HomeAssistantError as err:\n            raise FailedToLoad(self.domain, blueprint_path, err) from err\n\n        return Blueprint(\n            blueprint_data,\n            expected_domain=self.domain,\n            path=blueprint_path,\n            schema=self._blueprint_schema,\n        )\n\n    def _load_blueprints(self) -> dict[str, Blueprint | BlueprintException | None]:\n        \"\"\"Load all the blueprints.\"\"\"\n        blueprint_folder = pathlib.Path(\n            self.hass.config.path(BLUEPRINT_FOLDER, self.domain)","sourceCodeStart":212,"sourceCodeEnd":248,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/blueprint/models.py#L212-L248","documentation":"FailedToLoad wrapping FileNotFoundError: _load_blueprint could not find the blueprint file under the domain's blueprint folder. The path given in use_blueprint.path is resolved relative to config/blueprints/<domain>/, so a wrong path, missing file, or wrong extension produces this.","triggerScenarios":"An automation/script references use_blueprint.path: my_bp.yaml but config/blueprints/automation/my_bp.yaml does not exist; path includes a subdirectory that is missing; file saved with .yml versus .yaml mismatch; calling async_get_blueprint directly with an unknown path.","commonSituations":"Blueprint file deleted or renamed; blueprint never actually imported (import dialog closed early); path typo; blueprint stored in the wrong domain folder.","solutions":["Check the exact path in the error: it is relative to config/blueprints/<automation|script>/ — create or restore the file there","Re-import the blueprint from its source URL, which writes the file and picks the correct folder","Fix the use_blueprint.path string in the consuming automation to match the real filename and subfolder"],"exampleFix":"# before\nuse_blueprint:\n  path: motion_lights.yaml\n\n# after (file lives in blueprints/automation/domotics/motion_lights.yaml)\nuse_blueprint:\n  path: domotics/motion_lights.yaml","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\ndef blueprint_file_exists(hass, domain: str, path: str) -> bool:\n    return (Path(hass.config.path(\"blueprints\", domain)) / path).is_file()","typeGuard":null,"tryCatchPattern":"from homeassistant.components.blueprint.errors import FailedToLoad\ntry:\n    bp = await manager.async_get_blueprint(path)\nexcept FailedToLoad as err:\n    if isinstance(err.__cause__, FileNotFoundError):\n        # offer to re-import the blueprint or fix the path","preventionTips":["Prefer importing blueprints through the UI so files land in the right folder automatically","Treat config/blueprints like config: back it up and avoid manual renames"],"tags":["blueprint","file-not-found","paths"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}