From 0b071535be24fa599878e72cbd7da9decdace84a Mon Sep 17 00:00:00 2001 From: Salvialf Date: Wed, 18 Mar 2026 17:09:37 +0100 Subject: [PATCH 1/2] remove not needed anymore dependancy_info --- core/class/zwavejs.class.php | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/core/class/zwavejs.class.php b/core/class/zwavejs.class.php index 159d8e47..24413f5e 100644 --- a/core/class/zwavejs.class.php +++ b/core/class/zwavejs.class.php @@ -302,23 +302,6 @@ public static function additionnalDependancyCheck() { return $return; } - public static function dependancy_info() { - if (config::byKey('zwavejs::mode', 'zwavejs') == 'distant') { - $return = array(); - $return['state'] = 'ok'; - return $return; - } - $return = array(); - $return['progress_file'] = jeedom::getTmpFolder(__CLASS__) . '/dependance'; - $return['state'] = 'ok'; - if (config::byKey('lastDependancyInstallTime', __CLASS__) == '') { - $return['state'] = 'nok'; - } else if (!file_exists(__DIR__ . '/../../resources/zwave-js-ui/node_modules')) { - $return['state'] = 'nok'; - } - return $return; - } - public static function deamon_info() { if (config::byKey('zwavejs::mode', 'zwavejs') == 'distant') { $return = array(); From 2aae19cb5f32009b160b2bd4ae42af1011e81d9a Mon Sep 17 00:00:00 2001 From: Salvialf Date: Wed, 18 Mar 2026 17:46:39 +0100 Subject: [PATCH 2/2] improve additionnal dependency check --- core/class/zwavejs.class.php | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/core/class/zwavejs.class.php b/core/class/zwavejs.class.php index 24413f5e..3a3046f2 100644 --- a/core/class/zwavejs.class.php +++ b/core/class/zwavejs.class.php @@ -287,17 +287,11 @@ public static function postConfig_zwavejs_mode($_value) { } public static function additionnalDependancyCheck() { - if (config::byKey('zwavejs::mode', 'zwavejs') == 'distant') { - $return = array(); - $return['state'] = 'ok'; - return $return; - } $return = array(); - $return['state'] = 'ok'; - if (config::byKey('lastDependancyInstallTime', __CLASS__) == '') { - $return['state'] = 'nok'; - } else if (!file_exists(__DIR__ . '/../../resources/zwave-js-ui/node_modules')) { - $return['state'] = 'nok'; + if (config::byKey('zwavejs::mode', __CLASS__) === 'local') { + if (!file_exists(__DIR__ . '/../../resources/zwave-js-ui/node_modules')) { + $return['state'] = 'nok'; + } } return $return; }