From 9d098217fbab92b961feb5875e98f218906ce049 Mon Sep 17 00:00:00 2001 From: JonatanRek Date: Wed, 9 Oct 2019 10:59:05 +0200 Subject: [PATCH] Time base automation restart fix --- app/class/AutomationManager.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/class/AutomationManager.php b/app/class/AutomationManager.php index 9f1d613..80264b5 100644 --- a/app/class/AutomationManager.php +++ b/app/class/AutomationManager.php @@ -65,13 +65,13 @@ class AutomationManager{ $onValue = $today->setTime($onValue[0], $onValue[1]); $value = $today->getTimestamp(); } - if (time() > $value){ - if ($automation['executed'] == 0){ - $run = true; - } else if (time() < $value && $automation['executed'] = 1) { //recovery realowing of automation - $restart = true; - } + + if (time() > $value && $automation['executed'] == 0){ + $run = true; + } else if (time() < $value && $automation['executed'] = 1) { //recovery realowing of automation + $restart = true; } + } else if ($onValue['type'] == 'outHome') { } else if ($onValue['type'] == 'inHome') {