From dddcf5f5b0efc796694c563a23bae095fe3729be Mon Sep 17 00:00:00 2001
From: rainieryoung <wyoung@outlook.com>
Date: Sat, 12 Nov 2022 19:43:11 -0600
Subject: [PATCH] use hassUrl() for image path to support cast

Follows pattern from hui-image.ts https://github.com/home-assistant/frontend/blob/dev/src/panels/lovelace/components/hui-image.ts
---
 dist/hass-aarlo.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dist/hass-aarlo.js b/dist/hass-aarlo.js
index 01557e6..3fb70d4 100644
--- a/dist/hass-aarlo.js
+++ b/dist/hass-aarlo.js
@@ -1505,7 +1505,10 @@ class AarloGlance extends HTMLElement {
      */
     generateImageURL() {
         const camera = this._getState(this.cc.id,'unknown');
-        this.cs.image = camera.attributes.entity_picture + "&t=" + new Date().getTime()
+        
+        // For cast compatibility, use hassUrl()
+        // matches https://github.com/home-assistant/frontend/blob/dev/src/panels/lovelace/components/hui-image.ts
+        this.cs.image = this._hass.hassUrl(camera.attributes.entity_picture + "&t=" + new Date().getTime()) 
         this.cs.imageBase = camera.attributes.entity_picture
     }