From 3bb870f52af0f91bb112e76ec5f00136d1730632 Mon Sep 17 00:00:00 2001 From: Logan Rosen Date: Fri, 13 Mar 2026 02:27:39 -0400 Subject: [PATCH] Fix gallery integration card crash from invalid mock hassUrl (#30126) The gallery mock set hass.auth.data.hassUrl to an empty string, which caused brandsUrl() to throw when constructing a URL via new URL(base, ''). In production hassUrl is always a valid URL, so the mock now uses location.origin to match real behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/fake_data/provide_hass.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fake_data/provide_hass.ts b/src/fake_data/provide_hass.ts index e6dbda6b97..e1eebd9922 100644 --- a/src/fake_data/provide_hass.ts +++ b/src/fake_data/provide_hass.ts @@ -196,7 +196,7 @@ export const provideHass = ( // Home Assistant properties auth: { data: { - hassUrl: "", + hassUrl: location.origin, }, } as any, connection: {