]> _ Git - tortuga-home.git/commitdiff
.
authorvincent <vincent@enhydra.fr>
Fri, 15 Apr 2022 10:40:03 +0000 (12:40 +0200)
committervincent <vincent@enhydra.fr>
Fri, 15 Apr 2022 10:40:03 +0000 (12:40 +0200)
.idea/workspace.xml
scripts/lib/scenes.php
scripts/lib/velib.php

index d6a18afd0699f7681d5ca2399bf23f5d0607f6d3..c738befe32ae2ebbe9fd956a6e2205f438671348 100644 (file)
@@ -3,10 +3,6 @@
   <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/coffee.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/coffee.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/domoticz_device_event.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/domoticz_device_event.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/lib/ecomode.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/ecomode.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/scripts/lib/scenes.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/scenes.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/scripts/lib/velib.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/velib.php" afterDir="false" />
     </list>
       <workItem from="1649747856888" duration="2527000" />
       <workItem from="1649833630727" duration="738000" />
       <workItem from="1649835938314" duration="1458000" />
-      <workItem from="1649877396831" duration="6279000" />
-    </task>
-    <task id="LOCAL-00475" summary=".">
-      <created>1619641979806</created>
-      <option name="number" value="00475" />
-      <option name="presentableId" value="LOCAL-00475" />
-      <option name="project" value="LOCAL" />
-      <updated>1619641979806</updated>
+      <workItem from="1649877396831" duration="7495000" />
     </task>
     <task id="LOCAL-00476" summary=".">
       <created>1619777485542</created>
       <option name="project" value="LOCAL" />
       <updated>1649878545445</updated>
     </task>
-    <option name="localTasksCounter" value="524" />
+    <task id="LOCAL-00524" summary=".">
+      <created>1649892845510</created>
+      <option name="number" value="00524" />
+      <option name="presentableId" value="LOCAL-00524" />
+      <option name="project" value="LOCAL" />
+      <updated>1649892845510</updated>
+    </task>
+    <option name="localTasksCounter" value="525" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
index 047764546c52a24d58a49171dbb566ba94b26539..bcb96655e6e937545496ad67b07d9b8774c03690 100644 (file)
@@ -231,7 +231,7 @@ $scenes = [
     'chambre/off/exceptcheminee' => [
         ['type' => 'function', 'function' => 'chambreAuto', 'args' => [false]],
         ['type' => 'state', 'key' => 'chambre', 'value' => 0],
-        ['type' => 'hue', 'group' => $chambre, 'scene' => array('on' => false, 'brightness' => 0)],
+        ['type' => 'hue', 'group' => $chambre, 'scene' => array('on' => false)],
         // ['type' => 'insteon', 'command' => '0?1332=I=0=0'],
         ['type' => 'domoticz', 'scene' => 19, 'command' => false, 'priority' => true],
     ],
@@ -595,8 +595,8 @@ $scenes = [
         ['type' => 'domoticz', 'scene' => 42, 'command' => false, 'priority' => true],
         ['type' => 'function', 'function' => 'bureauAuto', 'args' => [false]],
         ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'off'],
-        ['type' => 'hue', 'group' => $bureau, 'scene' => array('on' => false, 'brightness' => 0)],
-        ['type' => 'hue', 'light' => 23, 'scene' => array('on' => false, 'brightness' => 0)],
+        ['type' => 'hue', 'group' => $bureau, 'scene' => array('on' => false)],
+        ['type' => 'hue', 'light' => 23, 'scene' => array('on' => false)],
     ],
     'bureau/off' => [
         ['type' => 'scene', 'scene' => 'bureau/base/off'],
@@ -684,7 +684,7 @@ $scenes = [
         ['type' => 'ecomode', 'mode' => '0'],
     ],
     'home/hueoff' => [
-        ['type' => 'hue', 'group' => 17, 'scene' => ['on' => false, 'brightness' => 0, 'effect' => 'none']],
+        ['type' => 'hue', 'group' => 17, 'scene' => ['on' => false, 'effect' => 'none']],
     ],
     'wc/on' => [
         ['type' => 'function', 'function' => 'wcOn'],
@@ -714,7 +714,7 @@ $scenes = [
         ['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['Nuit d\'été', $squeezeboxPlayers['WC'], 100, false]],
     ],
     'wc/off' => [
-        ['type' => 'hue', 'group' => $wc, 'scene' => ['on' => false, 'brightness' => 0, 'effect' => 'none']],
+        ['type' => 'hue', 'group' => $wc, 'scene' => ['on' => false, 'effect' => 'none']],
         ['type' => 'function', 'function' => 'stopSqueezeboxPlayer', 'args' => [$squeezeboxPlayers['WC'], false]],
         ['type' => 'state', 'key' => 'wc', 'value' => 0],
         ['type' => 'function', 'function' => 'wcVMCOff'],
@@ -797,7 +797,7 @@ $scenes = [
     ],
     'cuisine/off' => [
         ['type' => 'scene', 'scene' => 'cuisine/hotte/off'],
-        //['type' => 'hue', 'group' => $cuisine, 'scene' => array('on' => false, 'brightness' => 0)]
+        //['type' => 'hue', 'group' => $cuisine, 'scene' => array('on' => false)]
     ],
     'cuisine/toaster/toggle' => [
         ['type' => 'domoticz', 'device' => '1453', 'command' => 'Toggle', 'priority' => true],
@@ -895,11 +895,10 @@ function execScene($name, $fromUserAction = false, $transitionTime = null)
 
     $autoRooms = ['bureau', 'chambre', 'salon', 'cour'];
 
-    if (in_array($e[0], $autoRooms)) {
+    if (in_array($e[0], $autoRooms) && count($e) == 2) {
         setState($e[0] . 'Off', $e[1] === 'off' ? '1' : '0');
-        if ($fromUserAction && $e[1] !== 'auto' && count($e) == 2) {
+        if ($fromUserAction && $e[1] !== 'auto') {
             call_user_func($e[0] . 'Auto', false);
-
         }
     }
 
index ecf66ba7a48c51749881da3b961969c4a127125c..8d1d41d6f0f56283cb4682b266e1c05b8609c7f6 100644 (file)
@@ -5,7 +5,7 @@ function velibStations()
     `curl 'https://www.velib-metropole.fr/webapi/map/details?gpsTopLatitude=51&gpsTopLongitude=4&gpsBotLatitude=48&gpsBotLongitude=1&zoomLevel=11' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0' --output $cache`;
     $alldata = json_decode(file_get_contents($cache), true);
 
-    $stations = ['Cadet' => 9101, 'Bleue' => 9113, 'Folies bergères' => 9011, 9009, 'Le Pelletier' => 9014];
+    $stations = ['Cadet' => '9101', 'Bleue' => '9113', 'Folies bergères' => '9011', '9009', 'Le Pelletier' => '9014'];
     $res = array();
     foreach ($alldata as $n => $s) {
         if (!in_array($s['station']['code'], $stations)) {