{"record":{"id":"4fdad25dc9ec80e0","repo":"home-assistant/core","slug":"unsupported-url","errorCode":null,"errorMessage":"Unsupported URL","messagePattern":"Unsupported URL","errorType":"exception","errorClass":"HomeAssistantError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/blueprint/importer.py","lineNumber":287,"sourceCode":"    fetch_blueprint_from_github_gist_url,\n    fetch_blueprint_from_website_url,\n    fetch_blueprint_from_generic_url,\n)\n\n\nasync def fetch_blueprint_from_url(hass: HomeAssistant, url: str) -> ImportedBlueprint:\n    \"\"\"Get a blueprint from a url.\n\n    The returned blueprint will only be validated with BLUEPRINT_SCHEMA, not the domain\n    specific schema.\n    \"\"\"\n    for func in FETCH_FUNCTIONS:\n        with suppress(UnsupportedUrl):\n            imported_bp = await func(hass, url)\n            imported_bp.blueprint.update_metadata(source_url=url)\n            return imported_bp\n\n    raise HomeAssistantError(\"Unsupported URL\")\n","sourceCodeStart":269,"sourceCodeEnd":288,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/blueprint/importer.py#L269-L288","documentation":"Raised by fetch_blueprint_from_url when no registered FETCH_FUNCTIONS handler (community forum, GitHub) can import the given URL. Each fetcher raises UnsupportedUrl internally and is suppressed; only when the whole list is exhausted does this generic HomeAssistantError surface. It means the URL scheme/host is not one of the supported blueprint sharing sites.","triggerScenarios":"Calling the blueprint.import_panel / import_blueprint websocket or the 'blueprint' import flow with a URL whose host is not community.home-assistant.io or github.com (e.g. a pastebin, a GitLab link, a typo like 'http://comunity.home-assistant.io/t/...').","commonSituations":"User pastes a link to a blueprint forum topic that is actually a redirect or an external mirror; using a GitHub URL to a directory instead of a raw file; trailing typos in the domain; blueprint sharing from unsupported platforms.","solutions":["Use a URL from a supported source: a community.home-assistant.io topic URL or a GitHub URL accepted by the GitHub fetch function","If the blueprint is on another site, download the YAML manually and place it under config/blueprints/<domain>/<name>.yaml","Verify the URL opens in a browser and points at the blueprint topic/repo itself, not a screenshot or redirect page"],"exampleFix":"# before\nawait fetch_blueprint_from_url(hass, \"https://pastebin.com/raw/abc123\")\n\n# after\nawait fetch_blueprint_from_url(hass, \"https://community.home-assistant.io/t/123456\")","handlingStrategy":"try-catch","validationCode":"from urllib.parse import urlparse\n\nSUPPORTED_HOSTS = {\"community.home-assistant.io\", \"github.com\", \"www.github.com\"}\n\ndef url_supported(url: str) -> bool:\n    return urlparse(url).hostname in SUPPORTED_HOSTS","typeGuard":null,"tryCatchPattern":"try:\n    bp = await fetch_blueprint_from_url(hass, url)\nexcept HomeAssistantError as err:\n    if \"Unsupported URL\" in str(err):\n        # prompt user for a community forum or GitHub link\n        ...","preventionTips":["Restrict the import UI/input to community.home-assistant.io and github.com URLs","Parse and validate the host before calling the fetch API"],"tags":["blueprint","url","import","home-assistant"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}