]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Sat, 21 Nov 2020 16:27:44 +0000 (17:27 +0100)
committerVincent <vincent@enhydra.fr>
Sat, 21 Nov 2020 16:27:44 +0000 (17:27 +0100)
.idea/workspace.xml
scripts/lib/scenes.php

index 7ac12d2599209cf1819d8a3794d1a52438062d6c..3d1bd80a760a2307f4aa91d761becbd80ba0c3e0 100644 (file)
@@ -3,21 +3,7 @@
   <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$/config/bureau.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/bureau.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/chambre.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/chambre.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/cour.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/cour.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/cuisine.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/cuisine.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/default.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/default.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/entree.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/entree.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/litjerome.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/litjerome.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/litvincent.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/litvincent.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/salon.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/salon.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/sdb.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/sdb.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/index.php" beforeDir="false" afterPath="$PROJECT_DIR$/index.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/js/cordova.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/cordova.js" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/menu.less" beforeDir="false" afterPath="$PROJECT_DIR$/style/menu.less" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/style.css" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.css" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/style.less" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.less" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/scenes.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/scenes.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
         <option name="Make" enabled="true" />
       </method>
     </configuration>
+    <configuration default="true" type="ArquillianJUnit" factoryName="" nameIsGenerated="true">
+      <option name="arquillianRunConfiguration">
+        <value>
+          <option name="containerStateName" value="" />
+        </value>
+      </option>
+      <option name="TEST_OBJECT" value="class" />
+      <method v="2">
+        <option name="Make" enabled="true" />
+      </method>
+    </configuration>
     <configuration default="true" type="ArquillianTestNG" factoryName="">
       <option name="arquillianRunConfiguration">
         <value>
       <workItem from="1605542056704" duration="1640000" />
       <workItem from="1605597648537" duration="7658000" />
       <workItem from="1605690676577" duration="7108000" />
-    </task>
-    <task id="LOCAL-00357" summary=".">
-      <created>1604143127017</created>
-      <option name="number" value="00357" />
-      <option name="presentableId" value="LOCAL-00357" />
-      <option name="project" value="LOCAL" />
-      <updated>1604143127018</updated>
+      <workItem from="1605973078856" duration="2167000" />
     </task>
     <task id="LOCAL-00358" summary=".">
       <created>1604224463669</created>
       <option name="project" value="LOCAL" />
       <updated>1605696730817</updated>
     </task>
-    <option name="localTasksCounter" value="406" />
+    <task id="LOCAL-00406" summary=".">
+      <created>1605973216961</created>
+      <option name="number" value="00406" />
+      <option name="presentableId" value="LOCAL-00406" />
+      <option name="project" value="LOCAL" />
+      <updated>1605973216962</updated>
+    </task>
+    <option name="localTasksCounter" value="407" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
     </state>
     <state x="740" y="229" key="#com.jetbrains.php.refactoring.extractMethod.PhpExtractMethodDialog#function0/0.0.1707.920@0.0.1707.920" timestamp="1604146905948" />
     <state x="1110" y="259" key="#com.jetbrains.php.refactoring.extractMethod.PhpExtractMethodDialog#function0/0.0.2560.1040@0.0.2560.1040" timestamp="1605437484620" />
-    <state x="198" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1605696727985">
+    <state x="198" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1605973204132">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2/0.0.1707.920@0.0.1707.920" timestamp="1605086955514" />
     <state x="701" y="75" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1605188136787" />
-    <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1605696727985" />
+    <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1605973204132" />
     <state x="952" y="244" key="FileChooserDialogImpl" timestamp="1605726960903">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="1056" y="292" key="refactoring.ChangeSignatureDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1604518096294" />
-    <state x="512" y="211" key="run.anything.popup" timestamp="1604146410464">
-      <screen x="0" y="0" width="1707" height="920" />
+    <state x="768" y="239" key="run.anything.popup" timestamp="1605973994459">
+      <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="512" y="211" key="run.anything.popup/0.0.1707.920@0.0.1707.920" timestamp="1604146410464" />
+    <state x="768" y="239" key="run.anything.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1605973994459" />
     <state x="90" y="196" width="672" height="678" key="search.everywhere.popup" timestamp="1605086908435">
       <screen x="0" y="0" width="1707" height="920" />
     </state>
index e7c95e4f8f611f0a3ef70d1097c1d9709677b725..ca147f3f4490177bad5e21e2bb472b53003f3ef0 100644 (file)
@@ -30,13 +30,12 @@ $scenes = [
         ['type' => 'scene', 'scene' => 'chambre/nightlights'],
         ['type' => 'hue', 'group' => $chambre, 'scene' => 'dawn', 'delay' => 1],
         ['type' => 'scene', 'scene' => 'chambre/rideaux/open', 'delay' => 31],
-        ['type' => 'scene', 'scene' => 'chambre/auto', 'delay' => 35],
         ['type' => 'scene', 'scene' => 'chambre/deshumidificateur/on'],
         ['type' => 'scene', 'scene' => 'chambre/planetarium/off'],
         ['type' => 'function', 'function' => 'bedbrightness', 'args' => [255]],
         ['type' => 'phonetask', 'phone' => 'vincent', 'task' => 'Matin'],
         ['type' => 'ifttt', 'event' => 'coffee_on'],
-        ['type' => 'function', 'function' => 'chambreAuto', 'args' => [true]],
+        ['type' => 'scene', 'scene' => 'chambre/auto', 'delay' => 35],
     ],
     'chambre/deshumidificateur/on' => [
         ['type' => 'domoticz', 'device' => $chambrefan, 'command' => true],
@@ -709,7 +708,7 @@ function execScene($name, $fromUserAction = false, $transitionTime = null)
 
     $e = explode('/', $name);
 
-    if ($fromUserAction && $e[1] !== 'auto') {
+    if ($fromUserAction && $e[1] !== 'auto' && count($e) == 2) {
         if ($e[0] == 'chambre') {
             chambreAuto(false);
         } else if ($e[0] == 'bureau') {
@@ -950,8 +949,19 @@ function chambreAuto($on = true, $transitionTime = null)
         ecoMode(0);
         setState('chambreAutoMode', '1');
         updateChambreAuto($transitionTime);
-    } else {
+    } else if (getState('chambreAutoMode') === '1') {
         setState('chambreAutoMode', '0');
+        try {
+            if (isset($_SERVER['REQUEST_URI'])) {
+                $r = $_SERVER['REQUEST_URI'];
+            } else if (php_sapi_name() === 'cli') {
+                $r = 'cli ';
+            }
+            throw new Error('Setting chambre auto mode to false in ' . $r);
+        } catch (Error $e) {
+            $log = ROOT . '/log/chambreautooff.log';
+            file_put_contents($log, file_get_contents($log) . "\n\n" . date('Y-m-d H:i:s') . "\n" . $e->getMessage() . "\n" . $e->getTraceAsString());
+        }
     }
 }