]> _ Git - tortuga-home.git/commitdiff
. master
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 26 Mar 2026 11:35:05 +0000 (12:35 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 26 Mar 2026 11:35:05 +0000 (12:35 +0100)
.idea/dataSources.local.xml
.idea/workspace.xml
scripts/homeassistant_device_event.php
scripts/lib/scenes.php
scripts/lib/shield.php

index 73acb27920303dac49c5fcfbefb7edbff4be9659..db80606e5a39aa7e10430379ae7d21a75fb19782 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
-  <component name="dataSourceStorageLocal" created-in="IU-253.32098.37">
+  <component name="dataSourceStorageLocal" created-in="IU-261.22158.277">
     <data-source name="LFY(3).db" uuid="e5a3291d-855f-44b2-be41-76fe6b0c2136">
       <database-info product="SQLite" version="3.25.1" jdbc-version="2.1" driver-name="SQLite JDBC" driver-version="3.25.1" dbms="SQLITE" exact-version="3.25.1" exact-driver-version="3.25">
         <identifier-quote-string>&quot;</identifier-quote-string>
     <data-source name="LFY(3).db" uuid="e5a3291d-855f-44b2-be41-76fe6b0c2136">
       <database-info product="SQLite" version="3.25.1" jdbc-version="2.1" driver-name="SQLite JDBC" driver-version="3.25.1" dbms="SQLITE" exact-version="3.25.1" exact-driver-version="3.25">
         <identifier-quote-string>&quot;</identifier-quote-string>
index b0c0e8be1ed6bfc2c9ee7db17aaaa384fd2cd54d..c532e12b875ec2b52cbf288581f5b190af55c7e6 100644 (file)
@@ -5,9 +5,11 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
   </component>
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
+      <change beforePath="$PROJECT_DIR$/.idea/dataSources.local.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dataSources.local.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/lib/homeassistant.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/homeassistant.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/homeassistant_device_event.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/homeassistant_device_event.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/shield.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/shield.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/style/style.css" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.css" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
     </option>
   </component>
   <component name="Git.Settings">
     </option>
   </component>
   <component name="Git.Settings">
-    <option name="ROOT_SYNC" value="DONT_SYNC" />
-    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
     <option name="RECENT_BRANCH_BY_REPOSITORY">
       <map>
     <option name="RECENT_BRANCH_BY_REPOSITORY">
       <map>
-        <entry key="$PROJECT_DIR$" value="insteon" />
+        <entry key="$PROJECT_DIR$" value="7d8871d333db73c5e154bacf0e5b5972b602f039" />
       </map>
     </option>
       </map>
     </option>
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
+    <option name="ROOT_SYNC" value="DONT_SYNC" />
   </component>
   <component name="JupyterTrust" id="3f62eec0-7d7b-45be-bd97-06244d65817c" />
   <component name="MarkdownSettingsMigration">
   </component>
   <component name="JupyterTrust" id="3f62eec0-7d7b-45be-bd97-06244d65817c" />
   <component name="MarkdownSettingsMigration">
     <recent_temporary>
       <list>
         <item itemvalue="Shell Script.adb-connect" />
     <recent_temporary>
       <list>
         <item itemvalue="Shell Script.adb-connect" />
+        <item itemvalue="Shell Script.adb-connect" />
       </list>
     </recent_temporary>
   </component>
       </list>
     </recent_temporary>
   </component>
index ce2446f72e16ce179657ca278c326d31b9c36c38..d67aafd843f930c5c40b1f3d9daedd45e21bd717 100644 (file)
@@ -77,18 +77,10 @@ function wcSwitch()
             execScene('wc/spa', true);
             setState('wc', 1);
             break;
             execScene('wc/spa', true);
             setState('wc', 1);
             break;
-        case '1_hold':
-        case '2_hold':
+
         case 'hold':
         case 'hold':
-            if (isJerome(false) && isVincent()) {
-                execScene('home/alert', true);
-            } else {
-                wcToggle();
-            }
-            break;
         case 'single':
         case 'single':
-        case '1_single':
-        case '2_single':
+            wcToggle();
             wcToggle();
             break;
         default:
             wcToggle();
             break;
         default:
index 95290fd129d65aeb382fccb6217797f85f1eed77..5095edf0feaeb611205d0b2da928f366a7d7771c 100644 (file)
@@ -634,51 +634,19 @@ $scenes = [
     'wc/on' => [
         ['type' => 'function', 'function' => 'wcOn'],
     ],
     'wc/on' => [
         ['type' => 'function', 'function' => 'wcOn'],
     ],
-    'wc/morning' => [
-        ['type' => 'hue', 'group' => $wc, 'scene' => 'NC5ejamHGUNURj8'],
-        ['type' => 'function', 'function' => 'wcMusic', 'args' => [70]],
-    ],
-    'wc/day' => [
-        ['type' => 'hue', 'group' => $wc, 'scene' => 'qfuu8z5QaJ6J26W'],
-        ['type' => 'function', 'function' => 'wcMusic', 'args' => [80]],
-    ],
-    'wc/evening' => [
-        ['type' => 'hue', 'group' => $wc, 'scene' => 'h82j28eNu6ZHVhM'],
-        ['type' => 'function', 'function' => 'wcMusic', 'args' => [80]],
-    ],
-    'wc/late' => [
-        ['type' => 'hue', 'group' => $wc, 'scene' => 'IGo4F5jRQXc1H95'],
-        ['type' => 'function', 'function' => 'wcMusic', 'args' => [70]],
-    ],
-    'wc/night' => [
-        ['type' => 'hue', 'group' => $wc, 'scene' => 'eJy09JTEzCiIL1P'],
-    ],
-    'wc/nightambiance' => [
-        ['type' => 'hue', 'group' => $wc, 'scene' => ['effect' => 'none']],
-        ['type' => 'scene', 'scene' => 'wc/night'],
-        ['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['Nuit d\'été', $squeezeboxPlayers['WC'], 100, false]],
-    ],
-    'wc/off' => [
-        ['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'],
-    ],
+
+//    'wc/nightambiance' => [
+//        ['type' => 'hue', 'group' => $wc, 'scene' => ['effect' => 'none']],
+//        ['type' => 'scene', 'scene' => 'wc/night'],
+//        ['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['Nuit d\'été', $squeezeboxPlayers['WC'], 100, false]],
+//    ],
+
     'wc/spa' => [
         ['type' => 'hue', 'group' => $wc, 'scene' => ['effect' => 'colorloop', 'on' => true, 'brightness' => 128]],
         ['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['Rivière', $squeezeboxPlayers['WC'], 100]],
         ['type' => 'function', 'function' => 'wcVMCOff'],
     ],
     'wc/spa' => [
         ['type' => 'hue', 'group' => $wc, 'scene' => ['effect' => 'colorloop', 'on' => true, 'brightness' => 128]],
         ['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['Rivière', $squeezeboxPlayers['WC'], 100]],
         ['type' => 'function', 'function' => 'wcVMCOff'],
     ],
-    'wc/silentmorning' => [
-        ['type' => 'hue', 'group' => $wc, 'scene' => 'NC5ejamHGUNURj8'],
-        ['type' => 'function', 'function' => 'wcMusic', 'args' => [50]],
-    ],
-    'wc/vmc/on' => [
-        ['type' => 'function', 'function' => 'wcVMCOn'],
-    ],
-    'wc/vmc/off' => [
-        ['type' => 'ha', 'device' => HA_WC_VMC, 'command' => 'turn_off', 'priority' => true],
-    ],
+
     'sdb/ampli/on' => [
         ['type' => 'ha', 'device' => HA_SDB_AMPLI, 'priority' => true],
     ],
     'sdb/ampli/on' => [
         ['type' => 'ha', 'device' => HA_SDB_AMPLI, 'priority' => true],
     ],
@@ -892,30 +860,6 @@ function chambreToggle($fromUserAction = false)
     }
 }
 
     }
 }
 
-function wcMusic($volume)
-{
-    $d = date('w');
-    if ($d == 4) {
-        $music = 'New Morning';
-    } else if ($d == 2) {
-        $music = 'Radio Michel';
-    } else if ($d == 5) {
-        $music = 'Samba';
-        //$volume += 10;
-    } else {
-        $music = 'FIP';
-    }
-    squeezePlayByName($music, 'WC', $volume, false);
-}
-
-function wcToggle()
-{
-    if (getState('wc') == 1) {
-        execScene('wc/off', true);
-    } else {
-        wcOn();
-    }
-}
 
 function sdbToggle()
 {
 
 function sdbToggle()
 {
@@ -927,31 +871,6 @@ function sdbToggle()
     }
 }
 
     }
 }
 
-function wcOn($vmc = true)
-{
-    $hour = getHour();
-    if (getNightMode('chambre') && getNightMode('bureau')) {
-        $period = 'night';
-    } else if (getNightMode() && !getNightMode('bureau')) {
-        $period = 'silentmorning';
-    } else if ($hour > 0 && $hour < 6.75) {
-        $period = 'late';
-    } else if ($hour >= 6.75 && $hour < 10) {
-        $period = 'morning';
-    } else if ($hour >= 10 && $hour < 20) {
-        $period = 'day';
-    } else {
-        $period = 'evening';
-    }
-    execScene('wc/' . $period, true);
-    setState('wc', 1);
-    if ($vmc && $period != 'night' && $period !== 'silentmorning') {
-        wcVMCOn();
-    } else {
-        wcVMCOff(0);
-    }
-}
-
 function cheminee($lightId, $room = 'salon', $program = 'fire', $brightness = 1)
 {
     $start = time();
 function cheminee($lightId, $room = 'salon', $program = 'fire', $brightness = 1)
 {
     $start = time();
index f92ccbb61cbbd6fb60f80f28a031102e24914a61..09df2a78f4cb46809a90c12d6a90b647f25097af 100644 (file)
@@ -2,6 +2,19 @@
 
 $shieldConnect = false;
 
 
 $shieldConnect = false;
 
+function getDevice($device = null)
+{
+    global $devices;
+    if (is_array($device) && isset($device['host'])) {
+        return $device;
+    }
+    if (null === $device) {
+        $device = config('DEVICE');
+    }
+    return $devices[$device];
+}
+
+
 function shieldConnect($force = false, $device = null)
 {
     global $shieldConnect;
 function shieldConnect($force = false, $device = null)
 {
     global $shieldConnect;