From 4fc8349358ac44f2bb067ec7e779568cc20ab056 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Thu, 6 Jun 2024 07:30:21 +0200 Subject: [PATCH] Fix compatibility issue with 2024.6.0 --- wallpanel.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wallpanel.js b/wallpanel.js index 52d88a4..4c6753b 100644 --- a/wallpanel.js +++ b/wallpanel.js @@ -107,7 +107,7 @@ class ScreenWakeLock { } } -const version = "4.25.1"; +const version = "4.25.2"; const defaultConfig = { enabled: false, enabled_on_tabs: [], @@ -1142,7 +1142,8 @@ class WallpanelView extends HuiView { cardConfig.collection_key = "energy_wallpanel"; this.energyCollectionUpdateEnabled = true; } - const cardElement = this.createCardElement(cardConfig); + const createCardElement = this._createCardElement ? this._createCardElement : this.createCardElement; + const cardElement = createCardElement.bind(this)(cardConfig); cardElement.hass = this.hass; this.__cards.push(cardElement); @@ -3621,3 +3622,4 @@ EXIF.pretty = function(img) { EXIF.readFromBinaryFile = function(file) { return findEXIFinJPEG(file); } +