]> _ Git - tortuga-home.git/commitdiff
.
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 11 Aug 2023 10:33:16 +0000 (12:33 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 11 Aug 2023 10:33:16 +0000 (12:33 +0200)
.idea/workspace.xml
scripts/lib/ecomode.php
scripts/lib/homeassistant.php
scripts/lib/scenes.php

index ad7cf6f8bd24c39cb4407bf8093fca24d1f6c877..feeb202875897c7cc74465b0d1bfd67aeeee1f18 100644 (file)
@@ -5,10 +5,10 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
-      <change beforePath="$PROJECT_DIR$/.idea/sshConfigs.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/sshConfigs.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/webServers.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/webServers.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/dnsmasq.conf" beforeDir="false" afterPath="$PROJECT_DIR$/config/dnsmasq.conf" 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/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" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
     &quot;project.structure.proportion&quot;: &quot;0.0&quot;,
     &quot;project.structure.side.proportion&quot;: &quot;0.2&quot;,
     &quot;ruby.rails.projectView.checked&quot;: &quot;true&quot;,
-    &quot;settings.editor.selected.configurable&quot;: &quot;editor.preferences.fonts.default&quot;,
+    &quot;settings.editor.selected.configurable&quot;: &quot;preferences.pluginManager&quot;,
     &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
   }
 }</component>
       <recent name="T:\Drive\Works\home\images\rooms" />
     </key>
   </component>
-  <component name="RunManager" selected="Shell Script.Docker terminal">
+  <component name="RunManager" selected="Shell Script.Update DNS">
     <configuration default="true" type="Applet">
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
       <method v="2">
       <workItem from="1689699901478" duration="2677000" />
       <workItem from="1689794477505" duration="27000" />
       <workItem from="1690623646625" duration="2076000" />
-      <workItem from="1690896094427" duration="119000" />
+      <workItem from="1690896094427" duration="1950000" />
+      <workItem from="1690907942122" duration="34000" />
+      <workItem from="1690910375137" duration="580000" />
+      <workItem from="1691748561800" duration="648000" />
     </task>
     <task id="LOCAL-00502" summary=".">
       <created>1641726946298</created>
       <option name="project" value="LOCAL" />
       <updated>1687259667913</updated>
     </task>
-    <option name="localTasksCounter" value="584" />
+    <option name="localTasksCounter" value="585" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
index 74f3773bc40100dda252264e2b45f3d9f0ba0da6..b05b6e0db7c46d792720b31cd0d9f2887de3dc44 100644 (file)
@@ -49,17 +49,12 @@ function getNightMode($device = null)
             return false;
         }
     } else if ($device === 'bureau' || $device === 'bureausun') {
-        if (getState('bureauOff') == '1') {
+        if (haGetState(HA_OFFICE_CURTAIN) === 'closed') {
             return true;
         }
-        if (getDomoticzDeviceStatus(391) === 'Closed') {
-            return true;
-        }
-        if (getState('bureau_gradient') !== 'off') {
-            return false;
-        }
+        return getState('bureauOff') == '1';
     } else if ($device === 'wc') {
-        if (getState('bureau_gradient') !== 'off') {
+        if (!getState('bureauOff')) {
             return false;
         }
     } else if ($device === 'entree' || $device === 'cuisine') {
index 847b4486701b3426f0eb6a3c79b05d8d1280325c..f5269a44f62661f13d745772bf1c0b0f1e591228 100644 (file)
@@ -10,6 +10,9 @@ const HA_HOTTE = 'switch.hotte';
 const HA_BAR = 'switch.bar';
 const HA_PLANETARIUM = 'switch.0xa4c138788071821e';
 
+const HA_OFFICE_CURTAIN='cover.office_curtain';
+const HA_OFFICE_SCREEN='cover.office_screen';
+
 const HA_OFFICE_MAIN_SCREEN = 'switch.0xa4c138787633f01d';
 const HA_OFFICE_PLANE_SCREENS = 'switch.0xa4c138ba535d2cc5';
 
index 976529be5541dd79d27f0f25f1d32a7e771bf226..c35a455898387ca50f9641d03ad8ee8aee475dec 100644 (file)
@@ -628,19 +628,19 @@ $scenes = [
                ['type' => 'scene', 'scene' => 'bureau/auto'],
        ],
        'bureau/screen/down' => [
-               ['type' => 'ha', 'device' => 'cover.office_screen', 'command' => 'close_cover'],
+               ['type' => 'ha', 'device' => HA_OFFICE_SCREEN, 'command' => 'close_cover'],
        ],
        'bureau/screen/up' => [
-               ['type' => 'ha', 'device' => 'cover.office_screen', 'command' => 'open_cover'],
+               ['type' => 'ha', 'device' => HA_OFFICE_SCREEN, 'command' => 'open_cover'],
        ],
        'bureau/rideaux/close' => [
-               ['type' => 'ha', 'device' => 'cover.office_curtain', 'command' => 'close_cover'],
+               ['type' => 'ha', 'device' => HA_OFFICE_CURTAIN, 'command' => 'close_cover'],
        ],
        'bureau/rideaux/open' => [
-               ['type' => 'ha', 'device' => 'cover.office_curtain', 'command' => 'open_cover'],
+               ['type' => 'ha', 'device' => HA_OFFICE_CURTAIN, 'command' => 'open_cover'],
        ],
        'bureau/rideaux/toggle' => [
-               ['type' => 'ha', 'device' => 'cover.office_curtain', 'command' => 'toggle'],
+               ['type' => 'ha', 'device' => HA_OFFICE_CURTAIN, 'command' => 'toggle'],
        ],
        'insteon/off' => [
                // ['type' => 'insteon', 'command' => '0?135=I=0=0'],