]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Thu, 9 Jan 2020 07:57:00 +0000 (08:57 +0100)
committerVincent <vincent@enhydra.fr>
Thu, 9 Jan 2020 07:57:00 +0000 (08:57 +0100)
.idea/workspace.xml
scripts/cron/cron.php
scripts/ecomode.php
scripts/lib/ecomode.php

index b29d71bd21e34c194e68a7e01c8c344c82aca395..e47e6d85dbaa950511b46627ba53071ca2721803 100644 (file)
@@ -3,7 +3,9 @@
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/lib/mediarasp.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/mediarasp.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/cron/cron.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/cron/cron.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/ecomode.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/ecomode.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/ecomode.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/ecomode.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1577891426611" duration="8746000" />
       <workItem from="1578343490755" duration="8304000" />
       <workItem from="1578429518225" duration="1270000" />
-      <workItem from="1578473134474" duration="754000" />
-    </task>
-    <task id="LOCAL-00223" summary=".">
-      <created>1567583577405</created>
-      <option name="number" value="00223" />
-      <option name="presentableId" value="LOCAL-00223" />
-      <option name="project" value="LOCAL" />
-      <updated>1567583577405</updated>
+      <workItem from="1578473134474" duration="933000" />
+      <workItem from="1578556363591" duration="203000" />
     </task>
     <task id="LOCAL-00224" summary=".">
       <created>1567584398822</created>
       <option name="project" value="LOCAL" />
       <updated>1578472489576</updated>
     </task>
-    <option name="localTasksCounter" value="272" />
+    <task id="LOCAL-00272" summary=".">
+      <created>1578476755038</created>
+      <option name="number" value="00272" />
+      <option name="presentableId" value="LOCAL-00272" />
+      <option name="project" value="LOCAL" />
+      <updated>1578476755038</updated>
+    </task>
+    <option name="localTasksCounter" value="273" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
     </state>
     <state x="720" y="247" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1577298128269" />
     <state x="960" y="247" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1576479992407" />
-    <state x="935" y="114" key="CommitChangelistDialog2" timestamp="1578472484221">
+    <state x="935" y="114" key="CommitChangelistDialog2" timestamp="1578476742469">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="701" y="114" key="CommitChangelistDialog2/0.0.1920.1040@0.0.1920.1040" timestamp="1577381105204" />
     <state x="701" y="127" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1575647157027" />
-    <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1578472484221" />
+    <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1578476742469" />
     <state x="1114" y="443" key="NewPhpFileDialog" timestamp="1578038647334">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="872" y="242" key="Vcs.Push.Dialog.v2/0.0.2560.1040@0.0.2560.1040" timestamp="1577787700897" />
-    <state x="976" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1578473135400">
+    <state x="976" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1578556363447">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="732" y="343" key="com.intellij.ide.util.TipDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1577380394903" />
     <state x="732" y="383" key="com.intellij.ide.util.TipDialog/0.0.1920.1160@0.0.1920.1160" timestamp="1575647093028" />
-    <state x="976" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1578473135400" />
-    <state x="976" y="257" width="607" height="536" key="find.popup" timestamp="1578382838515">
+    <state x="976" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1578556363447" />
+    <state x="976" y="257" width="607" height="536" key="find.popup" timestamp="1578556582887">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="732" y="257" width="607" height="536" key="find.popup/0.0.1920.1040@0.0.1920.1040" timestamp="1577380471547" />
-    <state x="976" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1578382838515" />
+    <state x="976" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1578556582887" />
     <state x="936" y="240" key="run.anything.popup" timestamp="1578386519646">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
index 766a6fde86c7f35e06ce7cfe4f584dabb8acd3c2..685583a096ac668841c74448915f9f2d08fe1f7d 100644 (file)
@@ -55,7 +55,7 @@ function cronEcoMode($cronmin)
     if ($cronmin !== 0) {
         return;
     }
-    $ecomode = (int)getState('ecomode');
+    $ecomode = (int)getEcoMode();
     $scenes = [0 => 'off', 1 => 'on', 2 => 'super'];
     execScene('ecomode/' . $scenes[$ecomode]);
 }
index 82aedc948267dbf3f87cc7f0e44bf74a87e7ebff..b6ea01bdb65232c57a265e778f04847186a3432e 100644 (file)
@@ -9,7 +9,7 @@ if (isset($_GET['action'])) {
 }
 ob_end_clean();
 
-$res = getState('ecomode');
+$res = getEcoMode();
 if (!$res && in_array(config('DEVICE'), ['bureau', 'bureausun'])) {
     $res = getDomoticzDeviceStatus(391) === 'Closed';
 }
index ee0d5abb1db2cda965c4264db1b8751c32784740..3836064b928ec37bfd7c3b6539834b089252222a 100644 (file)
@@ -4,6 +4,7 @@ function ecoMode($mode)
     $currentMode = getState('ecomode', '0');
 
     setState('ecomode', $mode);
+    $mode = getEcoMode();
     if ($mode == '2') {
         execScene('ecomode/super');
     } else if ($mode == '1') {
@@ -27,4 +28,13 @@ function disableSuperEcoMode()
 function nightmode($mode)
 {
     setState('night', (!!$mode) ? '1' : '0');
+}
+
+function getEcoMode()
+{
+    $res = getState('ecomode');
+    if ($res == '0' && getState('night') == '1') {
+        $res = '1';
+    }
+    return $res;
 }
\ No newline at end of file