From 11fde89b47cd3bf959b9c006d0b142096997d9c7 Mon Sep 17 00:00:00 2001 From: Flobul Date: Sat, 4 Jan 2025 18:25:08 +0100 Subject: [PATCH 1/2] Don't refresh eqLogic battery widget --- core/js/eqLogic.class.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/js/eqLogic.class.js b/core/js/eqLogic.class.js index 73a4c5099d..3c7ea9878a 100644 --- a/core/js/eqLogic.class.js +++ b/core/js/eqLogic.class.js @@ -472,6 +472,7 @@ jeedom.eqLogic.refreshValue = function(_params) { eqLogics[_params[i].eqLogic_id] = { eqLogic: eqLogic, + type: eqLogic?.classList.contains('battery-widget') ? 'battery' : 'default' } sends[_params[i].eqLogic_id] = { version: ((version = eqLogic?.getAttribute('data-version')) != undefined) ? version : 'dashboard' @@ -492,6 +493,9 @@ jeedom.eqLogic.refreshValue = function(_params) { if (tile.childNodes.length == 0) { continue } + if (eqLogics[i].type === 'battery') { + continue + } eqLogic = eqLogics[i].eqLogic if (isElement_jQuery(eqLogic)) eqLogic = eqLogic[0] if (eqLogic == null) { From 31772a69a248b48b7183bebd32619b16e4a1cafb Mon Sep 17 00:00:00 2001 From: Flobul Date: Sat, 4 Jan 2025 18:26:06 +0100 Subject: [PATCH 2/2] Add battery-widget class --- core/class/eqLogic.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/class/eqLogic.class.php b/core/class/eqLogic.class.php index b38555d98a..5c677485fb 100644 --- a/core/class/eqLogic.class.php +++ b/core/class/eqLogic.class.php @@ -639,7 +639,7 @@ public function batteryWidget($_version = 'dashboard') { } $classAttr = $level . ' ' . $battery . ' ' . $plugins . ' ' . $object_name; $idAttr = $level . '__' . $battery . '__' . $plugins . '__' . $object_name; - $html .= '
'; + $html .= '
'; $eqName = $this->getName(); if ($_version == 'mobile') {