]> _ Git - tortuga-home.git/commitdiff
.
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 25 Mar 2026 15:55:26 +0000 (16:55 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 25 Mar 2026 15:55:26 +0000 (16:55 +0100)
.idea/workspace.xml
scripts/cron/cron.php
scripts/lib/automodes.php
scripts/lib/homeassistant.php
scripts/lib/scenes.php

index 87cedeb14fa8a28d6bba2ddf5c7bb9d04c655ecc..b0c0e8be1ed6bfc2c9ee7db17aaaa384fd2cd54d 100644 (file)
@@ -6,6 +6,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$/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" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
       <workItem from="1773390371781" duration="506000" />
       <workItem from="1774028822942" duration="792000" />
       <workItem from="1774430967346" duration="6359000" />
-      <workItem from="1774441121722" duration="7403000" />
+      <workItem from="1774441121722" duration="7518000" />
     </task>
     <task id="LOCAL-00502" summary=".">
       <created>1641726946298</created>
       <option name="project" value="LOCAL" />
       <updated>1687259667913</updated>
     </task>
-    <option name="localTasksCounter" value="645" />
+    <option name="localTasksCounter" value="646" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
index 9accfcf70be2f707d73501fd19061d6d2d24ecf3..dfce43465c0c2869046e5415a82cd7e43fae8f21 100644 (file)
@@ -80,8 +80,6 @@ function cronRooms($cronmin)
 
     _logSection('Cuisine');
     updateCuisine();
-    _logSection('Planetarium');
-    checkPlanetarium();
     if ($cronmin % 2) {
         _logSection('WC VMC');
         checkWCVMC();
index 204e9191d59d6fe1304bcaace372251953536798..2f7f0264aab61078153f9a781e366bb8a511fe42 100644 (file)
@@ -33,7 +33,6 @@ function autoRooms()
         }
         updateCuisine();
     }
-    checkPlanetarium();
     checkWCVMC();
 }
 
index 16ac75941874b8554195113531ed7fa983d26eef..cea97cd47b304ab69a1622d92836d5eda6dfe3d5 100644 (file)
@@ -12,7 +12,6 @@ const HA_ECO_SUPER = 'switch.ecomode_super';
 const HA_HOTTE = 'switch.hotte';
 const HA_BAR = 'switch.bar';
 const HA_GROW_LAMPS = 'switch.0x00124b0025e24358';
-const HA_PLANETARIUM = 'switch.0xa4c138788071821e';
 
 const HA_OFFICE_CURTAIN = 'input_boolean.rideaux_bureau';
 const HA_OFFICE_SCREEN = 'cover.office_screen';
index fbd345b7ba5c8078afe46a79c8d32735e451bfb9..95290fd129d65aeb382fccb6217797f85f1eed77 100644 (file)
@@ -52,7 +52,7 @@ $scenes = [
     'chambre/bed' => [
         ['type' => 'scene', 'scene' => 'chambre/bed/base'],
         ['type' => 'scene', 'scene' => 'chambre/nightlights'],
-        ['type' => 'scene', 'scene' => 'chambre/planetarium/on'], // Planétarium on
+        ['type' => 'scene', 'scene' => 'chambre/planetarium/on'],
         ['type' => 'scene', 'scene' => 'sdb/nuit'],
         ['type' => 'scene', 'scene' => 'chambre/cheminee/smallfire'],
     ],
@@ -77,8 +77,7 @@ $scenes = [
         ['type' => 'function', 'function' => 'bedbrightness', 'args' => [$bedlowscreenbrightness]],
         ['type' => 'scene', 'scene' => 'chambre/rideaux/close'],
         ['type' => 'scene', 'scene' => 'sdb/off'],
-        ['type' => 'scene', 'scene' => 'chambre/planetarium/on'], // Planétarium on
-        ['type' => 'delay', 'scene' => 'chambre/planetarium/off', 'delay' => 3600], // Planétarium off dans une heure
+        ['type' => 'scene', 'scene' => 'chambre/planetarium/on'],
     ],
     'chambre/sleep' => [
         ['type' => 'scene', 'scene' => 'chambre/cheminee/smallfire'],
@@ -213,12 +212,6 @@ $scenes = [
     'chambre/toggle' => [
         ['type' => 'function', 'function' => 'chambreToggle'],
     ],
-    'chambre/planetarium/off' => [
-        ['type' => 'function', 'function' => 'planetarium', 'args' => [false]],
-    ],
-    'chambre/planetarium/on' => [
-        ['type' => 'function', 'function' => 'planetarium', 'args' => [true]],
-    ],
     'chambre/vincent/lecture' => [
         ['type' => 'hue', 'light' => $litvincent, 'scene' => array('on' => true, 'brightness' => 35, 'colorTemp' => 346, 'transitionTime' => 10)],
     ],
@@ -959,33 +952,6 @@ function wcOn($vmc = true)
     }
 }
 
-function planetarium($on)
-{
-    setState('planetarium', $on ? '1' : '0');
-    checkPlanetarium(false);
-}
-
-function checkPlanetarium($periodicOffCheck = true)
-{
-    $on = getState('planetarium') == '1';
-    $h = date('G');
-    if ($h >= 2 && $h <= 20) {
-        $on = false;
-    }
-    if ($on) {
-        if ($periodicOffCheck) {
-            $min = intval(date('i'));
-            if ($min % 30 == 0) {
-                haAction(HA_PLANETARIUM, 'turn_off');
-                sleep(5);
-            }
-        }
-        haAction(HA_PLANETARIUM);
-    } else {
-        haAction(HA_PLANETARIUM, 'turn_off');
-    }
-}
-
 function cheminee($lightId, $room = 'salon', $program = 'fire', $brightness = 1)
 {
     $start = time();