diff --git a/src/dialogs/config-flow/step-flow-pick-handler.ts b/src/dialogs/config-flow/step-flow-pick-handler.ts
index cbfcf3b8d..381cca56d 100644
--- a/src/dialogs/config-flow/step-flow-pick-handler.ts
+++ b/src/dialogs/config-flow/step-flow-pick-handler.ts
@@ -23,6 +23,7 @@ import { HomeAssistant } from "../../types";
import { documentationUrl } from "../../util/documentation-url";
import { FlowConfig } from "./show-dialog-data-entry-flow";
import { configFlowContentStyles } from "./styles";
+import { brandsUrl } from "../../util/brands-url";
interface HandlerObj {
name: string;
@@ -102,7 +103,7 @@ class StepFlowPickHandler extends LitElement {
diff --git a/src/onboarding/integration-badge.ts b/src/onboarding/integration-badge.ts
index 5bf4267b5..bb84d3ce7 100644
--- a/src/onboarding/integration-badge.ts
+++ b/src/onboarding/integration-badge.ts
@@ -8,6 +8,7 @@ import {
TemplateResult,
} from "lit-element";
import "../components/ha-icon";
+import { brandsUrl } from "../util/brands-url";
@customElement("integration-badge")
class IntegrationBadge extends LitElement {
@@ -23,7 +24,7 @@ class IntegrationBadge extends LitElement {
return html`
{
+ return `https://brands.home-assistant.io/${
+ useFallback ? "_/" : ""
+ }${domain}/${type}.png`;
+};
diff --git a/test-mocha/util/generate-brands-url-spec.ts b/test-mocha/util/generate-brands-url-spec.ts
new file mode 100644
index 000000000..6d3c48edd
--- /dev/null
+++ b/test-mocha/util/generate-brands-url-spec.ts
@@ -0,0 +1,33 @@
+import * as assert from "assert";
+import { brandsUrl } from "../../src/util/brands-url";
+
+describe("Generate brands Url", function () {
+ it("Generate logo brands url for cloud component without fallback", function () {
+ assert.strictEqual(
+ // @ts-ignore
+ brandsUrl("cloud", "logo"),
+ "https://brands.home-assistant.io/cloud/logo.png"
+ );
+ });
+ it("Generate icon brands url for cloud component without fallback", function () {
+ assert.strictEqual(
+ // @ts-ignore
+ brandsUrl("cloud", "icon"),
+ "https://brands.home-assistant.io/cloud/icon.png"
+ );
+ });
+ it("Generate logo brands url for cloud component with fallback", function () {
+ assert.strictEqual(
+ // @ts-ignore
+ brandsUrl("cloud", "logo", true),
+ "https://brands.home-assistant.io/_/cloud/logo.png"
+ );
+ });
+ it("Generate icon brands url for cloud component with fallback", function () {
+ assert.strictEqual(
+ // @ts-ignore
+ brandsUrl("cloud", "icon", true),
+ "https://brands.home-assistant.io/_/cloud/icon.png"
+ );
+ });
+});