From: Vincent Vanwaelscappel Date: Mon, 10 Jul 2023 22:24:49 +0000 (+0200) Subject: . X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=0a5254fa7cae916075833b3bddb5b1da78b26fa3;p=tortuga-home.git . --- diff --git a/.idea/workspace.xml b/.idea/workspace.xml index bc801c6..4f597da 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,11 +5,9 @@ - - - - + + diff --git a/scripts/automodes.php b/scripts/automodes.php index 1159251..3f0d5de 100644 --- a/scripts/automodes.php +++ b/scripts/automodes.php @@ -5,4 +5,6 @@ if (isset($_GET['disable'])) { } if (isset($_GET['enable'])) { enableAutoModes(); -} \ No newline at end of file +} + +echo 'automodes are ' . (isAutoModeEnabled() ? 'enabled' : 'disabled'); \ No newline at end of file diff --git a/scripts/lib/automodes.php b/scripts/lib/automodes.php index ab20b77..3813132 100644 --- a/scripts/lib/automodes.php +++ b/scripts/lib/automodes.php @@ -34,6 +34,9 @@ function autoRooms() { } function updateBureauAuto() { + if(!isAutoModeEnabled()){ + return; + } if (getState('bureauOff') == '1') { execScene('bureau/off'); return; @@ -61,6 +64,9 @@ function updateBureauAuto() { } function updateCuisine() { + if(!isAutoModeEnabled()){ + return; + } $salon = getState('salon', 'off'); if ($salon === 'day' || $salon === 'on' || $salon === 'off' || $salon === 'tamise') { execScene('cuisine/base/on'); @@ -70,6 +76,9 @@ function updateCuisine() { } function updateCourAuto() { + if(!isAutoModeEnabled()){ + return; + } $h = date('H'); if ($h >= 7) { execScene('cour/projecteurs/off'); @@ -130,6 +139,9 @@ function courAuto($on = true) { } function updateSalonAuto() { + if(!isAutoModeEnabled()){ + return; + } if (getState('salonOff') == '1') { execScene('salon/off'); return; @@ -158,6 +170,9 @@ function updateSalonAuto() { } function updateChambreAuto($transitionTime = null) { + if(!isAutoModeEnabled()){ + return; + } if (getState('chambreOff') == '1') { execScene('chambre/off'); return;