From: Vincent Date: Tue, 3 Nov 2020 07:59:09 +0000 (+0100) Subject: . X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=effb2fdecf485830ccf238b1b8082326d629bc31;p=tortuga-home.git . --- diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 8156e3e..7628581 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,10 +3,10 @@ + + - - @@ -1294,21 +1294,21 @@ - + - + - - + + - + @@ -1321,11 +1321,11 @@ - - + + - + diff --git a/config/settings.php b/config/settings.php index f5b637a..cfd1046 100644 --- a/config/settings.php +++ b/config/settings.php @@ -20,6 +20,7 @@ $shortcuts['settings'] = [ ['type' => 'action', 'action' => 'close', 'label' => 'Fermer'], ['type' => 'action', 'action' => 'reload', 'label' => 'Recharger'], ['type' => 'action', 'action' => 'reboot', 'label' => 'Reboot'], + ['type' => 'url', 'href' => '/scripts/ecomode.php?action=fix', 'label' => 'Réparer scènes'] ]; if (in_array(getCurrentConfig(), $simple)) { diff --git a/scripts/cron/cron.php b/scripts/cron/cron.php index 1310b22..5ca5e3a 100644 --- a/scripts/cron/cron.php +++ b/scripts/cron/cron.php @@ -71,10 +71,7 @@ function cronInsteon($cronmin) function cronEcoMode($cronmin) { _logSection('Ecomode'); - $ecomode = (int)getEcoMode(); - $scenes = [0 => 'off', 1 => 'on', 2 => 'super']; - - execScene('ecomode/' . $scenes[$ecomode]); + ecoMode(null); } function cronTranscode($cronmin) diff --git a/scripts/ecomode.php b/scripts/ecomode.php index b6ea01b..27adc5d 100644 --- a/scripts/ecomode.php +++ b/scripts/ecomode.php @@ -3,6 +3,10 @@ require_once "import.php"; if (isset($_GET['action'])) { if ($_GET['action'] = 'disablesuper') { disableSuperEcoMode(); + } else if ($_GET['action'] == 'fix') { + ecoMode(null, true); + header('/'); + exit; } } else { heartbeat(); diff --git a/scripts/lib/ecomode.php b/scripts/lib/ecomode.php index ca88c74..8de82b5 100644 --- a/scripts/lib/ecomode.php +++ b/scripts/lib/ecomode.php @@ -1,12 +1,13 @@