Skip to content

Allow local brands assets in the brands validator#5128

Merged
edenhaus merged 4 commits intomainfrom
local-brands
Feb 28, 2026
Merged

Allow local brands assets in the brands validator#5128
edenhaus merged 4 commits intomainfrom
local-brands

Conversation

@ludeeus
Copy link
Copy Markdown
Member

@ludeeus ludeeus commented Feb 27, 2026

SSIA

Closes #5123
Closes #5124

Copilot AI review requested due to automatic review settings February 27, 2026 13:46
@ludeeus ludeeus changed the title Local brands Allow local brands assets in the brands validator Feb 27, 2026
@ludeeus ludeeus added the pr: action Changes to actions label Feb 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for local brands assets in HACS integrations, allowing repositories to include their own icon.png file in a brands/ directory rather than requiring them to be added to the Home Assistant brands repository. The implementation includes a fallback mechanism that maintains backward compatibility with the existing remote brands repository check.

Changes:

  • Added logic to check for local brands assets before falling back to remote brands repository
  • Added ASSET_FILENAME constant for the icon.png file
  • Added comprehensive test coverage for local brands functionality
  • Updated error message to be more descriptive

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
custom_components/hacs/validate/brands.py Implements local brands asset detection with fallback to remote brands repository, adds ASSET_FILENAME constant
tests/validate/test_brands_check.py Adds three new test cases covering local brands with content_in_root, without content_in_root, and fallback scenarios; imports HacsManifest and ASSET_FILENAME
tests/snapshots/api-usage/tests/validate/test_brands_checktest-local-brands-asset-content-in-root.json API usage snapshot for the content_in_root test case
tests/snapshots/api-usage/tests/validate/test_brands_checktest-local-brands-asset-not-in-root.json API usage snapshot for the not-in-root test case
tests/snapshots/api-usage/tests/validate/test_brands_checktest-local-brands-asset-missing-falls-back-to-remote.json API usage snapshot for the fallback test case

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread custom_components/hacs/validate/brands.py Outdated
Comment thread custom_components/hacs/validate/brands.py
Comment thread tests/validate/test_brands_check.py Outdated
Copy link
Copy Markdown
Contributor

@edenhaus edenhaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ludeeus 👍

@edenhaus edenhaus merged commit ba1100f into main Feb 28, 2026
26 checks passed
@edenhaus edenhaus deleted the local-brands branch February 28, 2026 07:54
@hacs-bot hacs-bot Bot added this to the next milestone Feb 28, 2026
philrenda added a commit to philrenda/precipitation-radial-card that referenced this pull request Feb 28, 2026
hacs/integration#5128 merged — the HACS validation action now accepts
brand icons shipped inside custom_components/<domain>/brand/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

pr: action Changes to actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New brands-proxy-api for providing integration icons

3 participants