{"record":{"id":"411682741466ff11","repo":"home-assistant/core","slug":"no-valid-blueprint-found-in-the-topic-blueprint-s","errorCode":null,"errorMessage":"No valid blueprint found in the topic. Blueprint syntax blocks need to be marked as YAML or no syntax.","messagePattern":"No valid blueprint found in the topic\\. Blueprint syntax blocks need to be marked as YAML or no syntax\\.","errorType":"exception","errorClass":"HomeAssistantError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/blueprint/importer.py","lineNumber":132,"sourceCode":"        block_content = html.unescape(block_content.strip())\n\n        try:\n            data = yaml_util.parse_yaml(block_content)\n        except HomeAssistantError:\n            if block_syntax == \"yaml\":\n                raise\n\n            continue\n\n        if not is_blueprint_config(data):\n            continue\n        assert isinstance(data, dict)\n\n        blueprint = Blueprint(data, schema=BLUEPRINT_SCHEMA)\n        break\n\n    if blueprint is None:\n        raise HomeAssistantError(\n            \"No valid blueprint found in the topic. Blueprint syntax blocks need to be\"\n            \" marked as YAML or no syntax.\"\n        )\n\n    return ImportedBlueprint(\n        f\"{post['username']}/{topic['slug']}\", block_content, blueprint\n    )\n\n\nasync def fetch_blueprint_from_community_post(\n    hass: HomeAssistant, url: str\n) -> ImportedBlueprint:\n    \"\"\"Get blueprints from a community post url.\n\n    Method can raise aiohttp client exceptions, vol.Invalid.\n\n    Caller needs to implement own timeout.\n    \"\"\"","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/blueprint/importer.py#L114-L150","documentation":"HomeAssistantError raised by blueprint.importer when fetching a blueprint from a community forum post: none of the post's code blocks parsed as a valid blueprint. The importer iterates code blocks, YAML-parses those marked yaml/no-syntax, checks is_blueprint_config (blueprint name + domain keys), and validates against BLUEPRINT_SCHEMA; if no block passes all stages, blueprint stays None and this error is thrown.","triggerScenarios":"Calling an automation/script that references a blueprint by community URL (or using the blueprint import UI) where the post's blueprint block is marked as a different syntax (e.g. ```text), is not valid YAML, is missing the blueprint: key with name/domain, fails BLUEPRINT_SCHEMA, or the YAML parse errored for every candidate block.","commonSituations":"Forum post edited so the code block lost its 'yaml' tag; blueprint author wrapped the YAML in ```text or ```jinja; post contains only a discussion snippet, not an importable blueprint; older post format predating the importer's expectations.","solutions":["Open the forum post and verify there is a code block marked as YAML containing a blueprint: key with name and domain","If the block is unmarked or marked text, copy the YAML manually and import it via the UI editor / configuration.yaml instead of by URL","Fix the blueprint body so it passes BLUEPRINT_SCHEMA (valid blueprint name, domain, input definitions)","Check the linked post is the blueprint topic itself, not a discussion thread referencing it"],"exampleFix":"# before (forum post block marked as text)\n```text\nblueprint:\n  domain: automation\n...\n```\n# after\n```yaml\nblueprint:\n  name: Motion light\n  domain: automation\n  input:\n    motion_entity:\n      selector: { entity: { domain: binary_sensor } }\n```","handlingStrategy":"validation","validationCode":"# Validate a candidate block locally before pointing HA at the post\nimport yaml\nfrom homeassistant.components.blueprint import importer\n\ndata = yaml.safe_load(block_text)\nassert importer.is_blueprint_config(data), \"block lacks blueprint: name/domain\"","typeGuard":"def looks_like_blueprint(text: str) -> bool:\n    \"\"\"Cheap pre-check: parses as YAML mapping with a blueprint key.\"\"\"\n    try:\n        data = yaml.safe_load(text)\n    except yaml.YAMLError:\n        return False\n    return isinstance(data, dict) and \"blueprint\" in data and isinstance(data[\"blueprint\"], dict) and \"name\" in data[\"blueprint\"] and \"domain\" in data[\"blueprint\"]","tryCatchPattern":"try:\n    imported = await importer.fetch_blueprint_from_community_post(hass, url)\nexcept HomeAssistantError as err:\n    if \"No valid blueprint found in the topic\" in str(err):\n        # fall back to manual import: copy YAML into config/blueprints/<domain>/\n        _LOGGER.warning(\"Falling back to manual blueprint install for %s\", url)","preventionTips":["Prefer importing blueprints from the official blueprint exchange topic format","Check the forum code block is fenced as ```yaml before importing by URL","Keep a local copy of important blueprints in config/blueprints/ to avoid forum drift"],"tags":["blueprint","importer","yaml","community-forum","automation"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}