Part of the Crooked Sentry universe
ha-branding-overrides is the recommended extraction target for the global Home Assistant branding override module that currently lives in this repo.
This repo ships one HACS dashboard/plugin artifact: dist/ha-branding-overrides.js.
This package is a global frontend module, not a Lovelace card.
HACS can distribute the JavaScript artifact, but Home Assistant still needs to load it through frontend.extra_module_url.
The package is intentionally BYOB:
dist//local/..., /hacsfiles/..., or absolute URLswindow.ha_branding_overridesThe extracted implementation does these things:
<head>document.titleHome Assistant text and matching accessibility labelsauth.enabled is setha-branding-overrides/
.github/
workflows/
validate.yml
dist/
ha-branding-overrides.js
examples/
branding-overrides-config.example.js
frontend.extra_module_url.yaml
example-assets/
README.md
scripts/
build_plugin.mjs
screenshots/
src/
ha-branding-overrides.js
tests/
validate-dist.mjs
.gitignore
README.md
hacs.json
package.json
The module reads window.ha_branding_overrides before it initializes.
Example:
window.ha_branding_overrides = {
appName: "Example Home",
homeAssistantName: "Home Assistant",
icon32Url: "/local/branding/favicon-32.png",
icon192Url: "/local/branding/favicon-192.png",
logoUrl: "/local/branding/logo.svg",
logoAlt: "Example Home",
logoSelectors: [".header img"],
removeSelectors: ['[data-default-brand-logo="1"]'],
themeColor: "#365D49",
titleReplacements: [
{ from: "Home Assistant", to: "Example Home" }
],
textReplacements: [
{ from: "Home Assistant", to: "Example Home" }
],
auth: {
enabled: true,
name: "Example Home",
icon32Url: "/local/branding/favicon-32.png",
icon192Url: "/local/branding/favicon-192.png",
logoLightUrl: "/local/branding/auth-logo-light.svg",
logoDarkUrl: "/local/branding/auth-logo-dark.svg",
theme: {
light: {
primary: "#365D49",
accent: "#FFDE3F"
},
dark: {
primary: "#6D9B7B",
accent: "#FFDE3F"
}
}
}
};
Recommended supported values:
homeAssistantNameappNameicon32Urlicon192UrllogoUrllogoAltlogoSelectorsremoveSelectorsthemeColortitleReplacementstextReplacementsauthIf appName is set and you do not provide custom replacement arrays, the module still defaults to replacing exact Home Assistant references in titles and text nodes.
Auth branding is opt-in and has no dependency on a specific OIDC, SSO, NetBird, or Authentik setup.
Set window.ha_branding_overrides.auth.enabled = true and load this same module on the auth page. When the current page looks like a Home Assistant auth page, the module will:
auth.logoLightUrl or auth.logoDarkUrlSupported auth values:
enablednameicon32Url, icon32, favicon32icon192Url, icon192, favicon192logoUrl, logoLightUrl, logoDarkUrllogoAltlogoSelectorstheme.lighttheme.darkFor compatibility with earlier Crooked Sentry auth work, the module also reads window.auth_oidc_branding as a fallback. New installs should prefer window.ha_branding_overrides.auth so branding remains independent from any auth package.
Loading note: Home Assistant frontend.extra_module_url is enough for normal frontend branding. Auth pages may be served by a separate auth provider or custom auth flow, so that provider must also load the config script and ha-branding-overrides.js if you want auth-page branding.
Dashboard.HA Branding Overrides.examples/branding-overrides-config.example.js.frontend.extra_module_url.Example:
frontend:
extra_module_url:
- /local/branding-overrides-config.js
- /hacsfiles/ha-branding-overrides/ha-branding-overrides.js
The config script must load first.
dist/ha-branding-overrides.js into your Home Assistant www/ directory./config/www/branding-overrides-config.js.Load both through frontend.extra_module_url:
frontend:
extra_module_url:
- /local/branding-overrides-config.js
- /local/ha-branding-overrides.js
src/ha-branding-overrides.js.Rebuild the install artifact:
npm run build
Run validation:
npm run check
npm test
dist/ha-branding-overrides.js.The CI workflow fails if the built artifact is out of date.
dist/ contains only installable runtime artifacts.examples/ contains config examples and sample assets only.screenshots/ is for README assets only.examples/ and never be required for runtime use./local/... and absolute URLs for user-supplied assets.Recommended public rename for the extracted module:
crooked-sentry-branding -> ha-branding-overridesThat applies to:
Current source file in this monorepo maps to the extracted repo like this:
homeassistant/www/community/crooked-sentry-branding/crooked-sentry-branding.js -> src/ha-branding-overrides.jsCurrent install automation in this repo also wires the script into frontend.extra_module_url in:
scripts/install-stack.shThe extracted public repo should ship only the reusable frontend module and examples. Appliance-specific automation stays in this monorepo.
crooked-sentry-branding.js, remapped onto the public window.ha_branding_overrides config seam.Crooked Sentry strings or /local/community/... asset paths.frontend.extra_module_url automation still belongs in this monorepo.