Repository navigation
Conversation
The `entity_picture` on HACS Update entities hardcoded the legacy CDN URL `https://brands.home-assistant.io/_/{domain}/icon.png`. That CDN no longer accepts new custom-integration submissions after the brands-proxy API arrived in HA 2026.3, so Update entities for custom integrations that ship inline `brand/` assets show broken pictures. Switch to `/api/brands/integration/{domain}/icon.png` — a path served by HA's local brands proxy, which resolves both core integrations (via the upstream CDN with stale-while-revalidate) and custom integrations (via the inline asset). The HA frontend's `addBrandsAuth` helper appends the access token client-side when rendering the URL. Snapshots regenerated with `pytest --snapshot-update`. Relates to hacs#5171, hacs#5223 Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
@ludeeus sorry for pinging you, but any chance to take a look at this PR and additionally hacs/frontend#937? We would love to have icons back for integrations. Hope to hear from you! |
|
@manuveli found this pr investigating the missing update icon, for my integration. seems you need to fix some conflicts |
| @@ -76,7 +76,7 @@ def entity_picture(self) -> str | None: | |||
| ): | |||
| return None | |||
|
|
|||
| return f"https://brands.home-assistant.io/_/{self.repository.data.domain}/icon.png" | |||
| return f"/api/brands/integration/{self.repository.data.domain}/icon.png" | |||
There was a problem hiding this comment.
This will throw 404 if Home Assistant is < 2026.3.0, so it needs to be guarded for that.
Does this not need any authentication?
Home Assistant only discovers custom-integration brand icons from inside the integration's own brand/ folder (since 2026.3's brands proxy API), not the repo root -- icon.png/logo.png sitting at the top level were never being picked up by HA at all. Note: a currently-open HACS frontend bug (hacs/integration#5223) means HACS's own downloads-panel UI may still show "icon not available" even with this correctly in place -- a fix exists (hacs/integration#5228, hacs/frontend#937) but isn't merged yet. Home Assistant's own Settings > Devices & Services page should pick this up correctly regardless.
The logo of 0.3.0 and 0.4.0 shows on the pages of Home Assistant, but HACS shows the grey placeholder in its list and in its update entry. That is not something this repository can change: HACS 2.0.5 (the latest release) builds both icon addresses on the old brands server, brands.home-assistant.io/_/<domain>/icon.png, which answers with the placeholder for every domain it does not know, and home-assistant/brands closes pull requests for custom integrations since Home Assistant 2026.3. The fixes for HACS (hacs/integration#5228 and #5388, hacs/frontend#929 and #937) are still open. The README now says so, so that nobody takes it for a bug of this integration. Documentation only; the code and the version stay as they are. Co-authored-by: Copilot App <[email protected]>
|
Thanks for this, and for the solid tests. HACS is moving into Home Assistant as the Marketplace integration (see #5590), so fixes won't land here anymore. Good news though: this one is already handled in Marketplace, which ships with Home Assistant 2026.11. Closing this one. ../Frenck Blogging my personal ramblings at frenck.dev |
Summary
HacsRepositoryUpdateEntity.entity_picturereturned a hardcoded legacy-CDN URL:After the brands-proxy API landed in HA 2026.3, the CDN no longer accepts new custom-integration submissions, so Update entities for custom integrations that ship inline
brand/assets show a broken picture.Change
Return
/api/brands/integration/{domain}/icon.png— a relative path served by HA's local brands proxy. For core integrations the proxy fetches the upstream CDN image via stale-while-revalidate; for custom integrations it serves the inlinebrand/icon.pngbundled with the integration.Snapshots under
tests/snapshots/hacs-test-org/were regenerated viapytest --snapshot-update. Thedomains.jsonreferences incustom_components/hacs/validate/brands.pyand its fixtures are intentionally untouched — that validator's fallback still serves a valid back-compat check for custom integrations already present in the brands repo.Relates to #5171
Relates to #5223
The primary fix for the HACS dashboard icons lives in hacs/frontend; this PR finishes the job for Update entities.
Open question for reviewers
This change assumes the HA frontend's entity-picture rendering pipeline applies
addBrandsAuth(from upstreamsrc/util/brands-url.ts) to URLs beginning with/api/brands/, so that the access token gets appended client-side. If that's not the case for the update-card render path, the path will 401 on HA ≥ 2026.3. Please verify — happy to pivot if a different shape of URL is preferred.Test plan
scripts/testpasses (pytest with refreshed snapshots).ruff checkpasses./api/brands/integration/{domain}/icon.png?token=….🤖 Generated with Claude Code