From efeeac820a11d53cf6c710c9dba78ab38bbbdeb6 Mon Sep 17 00:00:00 2001 From: luixal Date: Sun, 31 Dec 2023 13:32:00 +0100 Subject: [PATCH] Fixes constant refresh. Bumps to version 0.2.0 --- media-source-image-card.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/media-source-image-card.js b/media-source-image-card.js index 4a5fe48..af63458 100644 --- a/media-source-image-card.js +++ b/media-source-image-card.js @@ -93,12 +93,12 @@ class MediaSourceImageCard extends HTMLElement { if (!this.content) this.renderBase(); // resolve image from media source and render it: if (!this.image || this.image != this.config.image) { + this.image = this.config.image; this.getImageUrl(this.config.image) .then(imageUrl => { - this.image = imageUrl; hass.callWS({ type: "media_source/resolve_media", - media_content_id: this.image + media_content_id: imageUrl }).then(response => { this.content.innerHTML = ``; }).catch(error => { @@ -163,7 +163,7 @@ window.customCards.push({ }); console.info( - `%c MEDIA SOURCE IMAGE CARD %c Version 0.1.2 `, + `%c MEDIA SOURCE IMAGE CARD %c Version 0.2.0 `, 'color: orange; font-weight: bold; background: black', 'color: white; font-weight: bold; background: dimgray', );