From 2e6262e8e19e1a6ab7a898103d8bbda46abea16a Mon Sep 17 00:00:00 2001 From: Flobul Date: Sat, 11 Jan 2025 10:44:52 +0100 Subject: [PATCH] Update manual cmds in jeedom::monitor When other commandes are added to eqLogic jeedom::monitor, they were not updated --- core/class/virtual.class.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/core/class/virtual.class.php b/core/class/virtual.class.php index 39d7174..119059a 100644 --- a/core/class/virtual.class.php +++ b/core/class/virtual.class.php @@ -278,6 +278,20 @@ public function applyTemplate($_template) { public function refresh() { if($this->getLogicalId() == 'jeedom::monitor'){ self::updateJeedomMonitor(); + try { + foreach ($this->getCmd('info') as $cmd) { + if ($cmd->getLogicalId() != '') continue; + if ($cmd->getConfiguration('calcul') == '' || $cmd->getConfiguration('virtualAction', 0) != '0') { + continue; + } + $value = $cmd->execute(); + if ($cmd->execCmd() != $cmd->formatValue($value)) { + $cmd->event($value); + } + } + } catch (Exception $exc) { + log::add('virtual', 'error', __('Erreur pour', __FILE__) . ' ' . $this->getHumanName() . ' : ' . $exc->getMessage()); + } return; } try {