Initial motionEye commit.

This commit is contained in:
Dermot Duffy
2023-03-26 16:42:21 -07:00
parent 05e9db4cc5
commit 304c7e3164
55 changed files with 1780 additions and 245 deletions
+4 -3
View File
@@ -354,12 +354,13 @@ export const isCardInPanel = (card: HTMLElement): boolean => {
* location will be the Chromecast receiver, not HA).
* @param url The media URL
*/
export const canonicalizeHAURL = (
export function canonicalizeHAURL(hass: ExtendedHomeAssistant, url: string): string;
export function canonicalizeHAURL(
hass: ExtendedHomeAssistant,
url?: string,
): string | null => {
): string | null {
if (hass && url && url.startsWith('/')) {
return hass.hassUrl(url);
}
return url ?? null;
};
}