]> _ Git - tortuga-home.git/commitdiff
.
authorvincent <vincent@enhydra.fr>
Wed, 13 Apr 2022 19:29:03 +0000 (21:29 +0200)
committervincent <vincent@enhydra.fr>
Wed, 13 Apr 2022 19:29:03 +0000 (21:29 +0200)
.idea/workspace.xml
scripts/lib/scenes.php

index dae97d80510f8f7aed46d092997988b7dfc89c74..8f8e39252c0aaa69bbdde03e441d56d493b5f2ae 100644 (file)
@@ -2,12 +2,7 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
-      <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/entree.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/entree.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/rooms.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/rooms.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/install.md" beforeDir="false" afterPath="$PROJECT_DIR$/install.md" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/domoticz_device_event.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/domoticz_device_event.php" 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="hideEmptyMiddlePackages" value="true" />
     <option name="showLibraryContents" value="true" />
   </component>
-  <component name="PropertiesComponent"><![CDATA[{
-  "keyToString": {
-    "WebServerToolWindowFactoryState": "true",
-    "WebServerToolWindowPanel.toolwindow.highlight.mappings": "true",
-    "WebServerToolWindowPanel.toolwindow.highlight.symlinks": "true",
-    "WebServerToolWindowPanel.toolwindow.show.date": "false",
-    "WebServerToolWindowPanel.toolwindow.show.permissions": "false",
-    "WebServerToolWindowPanel.toolwindow.show.size": "false",
-    "nodejs_package_manager_path": "npm",
-    "ruby.rails.projectView.checked": "true",
-    "vue.rearranger.settings.migration": "true"
+  <component name="PropertiesComponent">{
+  &quot;keyToString&quot;: {
+    &quot;WebServerToolWindowFactoryState&quot;: &quot;true&quot;,
+    &quot;WebServerToolWindowPanel.toolwindow.highlight.mappings&quot;: &quot;true&quot;,
+    &quot;WebServerToolWindowPanel.toolwindow.highlight.symlinks&quot;: &quot;true&quot;,
+    &quot;WebServerToolWindowPanel.toolwindow.show.date&quot;: &quot;false&quot;,
+    &quot;WebServerToolWindowPanel.toolwindow.show.permissions&quot;: &quot;false&quot;,
+    &quot;WebServerToolWindowPanel.toolwindow.show.size&quot;: &quot;false&quot;,
+    &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
+    &quot;ruby.rails.projectView.checked&quot;: &quot;true&quot;,
+    &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
   }
-}]]></component>
+}</component>
   <component name="RecentsManager">
     <key name="CopyFile.RECENT_KEYS">
       <recent name="T:\Drive\Works\home" />
       <workItem from="1647437683316" duration="79000" />
       <workItem from="1649747856888" duration="2527000" />
       <workItem from="1649833630727" duration="738000" />
-      <workItem from="1649835938314" duration="1333000" />
-    </task>
-    <task id="LOCAL-00472" summary=".">
-      <created>1619248801662</created>
-      <option name="number" value="00472" />
-      <option name="presentableId" value="LOCAL-00472" />
-      <option name="project" value="LOCAL" />
-      <updated>1619248801663</updated>
+      <workItem from="1649835938314" duration="1458000" />
+      <workItem from="1649877396831" duration="699000" />
     </task>
     <task id="LOCAL-00473" summary=".">
       <created>1619348281960</created>
       <option name="project" value="LOCAL" />
       <updated>1649833131470</updated>
     </task>
-    <option name="localTasksCounter" value="521" />
+    <task id="LOCAL-00521" summary=".">
+      <created>1649837406908</created>
+      <option name="number" value="00521" />
+      <option name="presentableId" value="LOCAL-00521" />
+      <option name="project" value="LOCAL" />
+      <updated>1649837406909</updated>
+    </task>
+    <option name="localTasksCounter" value="522" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
index d74960244fc8cc497e153dbf7f3f7c3f1feaef3d..1559974764cdcd506fe475b44c8df0bf318f4787 100644 (file)
@@ -910,15 +910,8 @@ function execScene($name, $fromUserAction = false, $transitionTime = null)
     $e = explode('/', $name);
 
     if ($fromUserAction && $e[1] !== 'auto' && count($e) == 2) {
-        if ($e[0] == 'chambre') {
-            chambreAuto(false);
-        } else if ($e[0] == 'bureau') {
-            bureauAuto(false);
-        } else if ($e[0] == 'cour') {
-            courAuto(false);
-        } else if ($e[0] == 'salon') {
-            salonAuto(false);
-        }
+        call_user_func($e[0] . 'Auto', false);
+        setState($e[0] . 'Off', $e[1] === 'off' ? '1' : '0');
     }
 
     $killurl = WEB_ROOT . 'scripts/light.php?[r]=2';
@@ -945,9 +938,7 @@ function execScene($name, $fromUserAction = false, $transitionTime = null)
 
         if ($action['type'] == 'hue') {
             hueCommand($action, $transitionTime);
-        } else if ($action['type'] == 'insteon') {
-            insteonCommand($action['command']);
-        } else if ($action['type'] == 'delay' || $action['type'] == 'scene') {
+        }  else if ($action['type'] == 'delay' || $action['type'] == 'scene') {
             if (!isset($action['delay'])) {
                 $action['delay'] = 0;
             }
@@ -1175,6 +1166,10 @@ function salonAuto($on = true)
 
 function chambreAuto($on = true, $transitionTime = null)
 {
+    if (getState('chambreOff') == '1') {
+        execScene('chambre/off');
+        return;
+    }
     if ($on) {
         ecoMode(0);
         setState('chambreAutoMode', '1');
@@ -1206,6 +1201,10 @@ function courAuto($on = true)
 
 function updateSalonAuto()
 {
+    if (getState('salonOff') == '1') {
+        execScene('salon/off');
+        return;
+    }
     $hours = intval(date('H'));
     if ($hours <= 9) {
         $scene = 'tamise';
@@ -1219,6 +1218,10 @@ function updateSalonAuto()
 
 function updateChambreAuto($transitionTime = null)
 {
+    if (getState('chambreOff') == '1') {
+        execScene('chambre/off');
+        return;
+    }
     $hours = intval(date('H'));
     if ($hours <= 4) {
         $scene = 'party';
@@ -1240,6 +1243,10 @@ function updateChambreAuto($transitionTime = null)
 
 function updateBureauAuto()
 {
+    if (getState('bureauOff') == '1') {
+        execScene('bureau/off');
+        return;
+    }
     $hours = intval(date('H'));
     if ($hours <= 4) {
         $scene = 'outrun';
@@ -1271,6 +1278,10 @@ function updateCuisine()
 
 function updateCourAuto()
 {
+    if (getState('courOff') == '1') {
+        execScene('cour/off');
+        return;
+    }
     if (isDay()) {
         $scene = 'daylight';
     } else {