Skip to content

Commit

Permalink
Merge pull request #130 from rainieryoung/patch-1
Browse files Browse the repository at this point in the history
use hassUrl() for image path to support cast
  • Loading branch information
twrecked authored Dec 9, 2022
2 parents bb27ae4 + dddcf5f commit 4a7b29f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dist/hass-aarlo.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 4a7b29f

Please sign in to comment.