From 3239911da2999d0d74b2658e63675f3219e3962f Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Fri, 16 Aug 2024 10:00:28 +0200 Subject: [PATCH] Fix getting lovelace --- wallpanel.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wallpanel.js b/wallpanel.js index 9b9b162..8e3bd3e 100644 --- a/wallpanel.js +++ b/wallpanel.js @@ -107,7 +107,7 @@ class ScreenWakeLock { } } -const version = "4.25.6"; +const version = "4.25.7"; const defaultConfig = { enabled: false, enabled_on_tabs: [], @@ -670,7 +670,7 @@ class WallpanelView extends HuiView { this.lastEnergyCollectionUpdate = 0; this.screensaverStopNavigationPathTimeout = null; - this.lovelace = getHaPanelLovelace().__lovelace; + this.lovelace = null; this.__hass = elHass.__hass; this.__cards = []; this.__badges = []; @@ -1108,6 +1108,7 @@ class WallpanelView extends HuiView { createInfoBoxContent() { logger.debug("Creating info box content"); + this.lovelace = getHaPanelLovelace().__lovelace; this.infoBoxContentCreatedDate = new Date(); this.infoBoxContent.innerHTML = ''; this.__badges = []; @@ -3644,3 +3645,4 @@ EXIF.pretty = function(img) { EXIF.readFromBinaryFile = function(file) { return findEXIFinJPEG(file); } +