Use the HACS repository icon endpoint for dashboard icons#945
Open
Niek wants to merge 3 commits into
Open
Conversation
Point integration icons at /api/hacs/repository/{id}/icon.png served by
the HACS integration, instead of the public brands CDN which no longer
accepts images for custom integrations. Repositories without a domain
keep the CDN placeholder fallback.
This was referenced Jul 15, 2026
There was a problem hiding this comment.
Pull request overview
This PR updates how HACS dashboard repository icons are resolved, switching integration icons to the HACS backend’s repository icon endpoint so icons can be served from each repository’s bundled brand/ assets (with backend caching/redirect behavior), instead of relying on the public brands CDN which no longer accepts new custom-integration images.
Changes:
- Use
/api/hacs/repository/{id}/{icon|dark_icon}.pngfor integration repository icons when a domain exists. - Keep the existing
brandsUrl(...)fallback path for repositories without a domain.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed change
Uses the repository icon endpoint provided by hacs/integration#5388 for integration rows instead of relying only on the public brands CDN.
Since Home Assistant 2026.3, custom integrations ship brand icons inside the repository (
custom_components/<domain>/brand/), andhome-assistant/brandsno longer accepts images for custom integrations. The CDN URLs used today therefore show placeholders for integrations that are not grandfathered in.This change:
brands/access_tokenand refreshes it every 30 minutes;referrerpolicy="no-referrer";dark_icon.pngin dark mode andicon.pngotherwise;alt="".Requires hacs/integration#5388.
Release follow-up
The integration currently pins frontend release
20250128065759inscripts/install/frontend. After both PRs merge, a new frontend release must be published and that pin must be bumped before the integration release. Until then, merging this PR alone does not ship the frontend change to HACS users.Related issues and PRs: hacs/integration#5171, hacs/integration#5179, hacs/integration#5223, and earlier installed-only approaches #937 / #929.
Verification
src/dashboards/hacs-dashboard.ts.tsparticles-preset-links@2.12.0package; the same dependency is present onmain.