From 6b814800678e73435c9864da74623f3c320fc745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= <1536036+zoic21@users.noreply.github.com> Date: Thu, 9 Nov 2023 09:30:23 +0100 Subject: [PATCH] Update thermostat.class.php --- core/class/thermostat.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/class/thermostat.class.php b/core/class/thermostat.class.php index af7212c..69c2410 100644 --- a/core/class/thermostat.class.php +++ b/core/class/thermostat.class.php @@ -1598,6 +1598,10 @@ public function stopThermostat($_repeat = false, $_suspend = false) { log::add(__CLASS__, 'error', $this->getHumanName() . ' ' . __('Erreur lors de l\'exécution de', __FILE__) . ' ' . $action['cmd'] . '. ' . __('Détails', __FILE__) . ' : ' . $e->getMessage()); } } + $power = $this->getCmd(null, 'power'); + if (is_object($power)) { + $power->event(0); + } if ($_repeat) { return; } @@ -1606,10 +1610,6 @@ public function stopThermostat($_repeat = false, $_suspend = false) { } $this->save(); $this->getCmd(null, 'actif')->event(0); - $power = $this->getCmd(null, 'power'); - if (is_object($power)) { - $power->event(0); - } } public function orderChange() {