]> _ Git - tortuga-home.git/commitdiff
.
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 6 Jul 2023 08:13:14 +0000 (10:13 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 6 Jul 2023 08:13:14 +0000 (10:13 +0200)
.idea/workspace.xml
scripts/lib/homeassistant.php
scripts/lib/scenes.php

index 25586366ffec0e28f74f920ab6a39a3f1e0c4e00..c13f405ae7873ce92bcf110ddd54f1983382a9f8 100644 (file)
@@ -5,6 +5,8 @@
   </component>
   <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="1687359859243" duration="1495000" />
       <workItem from="1688295154056" duration="11039000" />
       <workItem from="1688414368761" duration="11417000" />
-      <workItem from="1688478993471" duration="45143000" />
+      <workItem from="1688478993471" duration="46036000" />
+      <workItem from="1688629879840" duration="1126000" />
     </task>
     <task id="LOCAL-00502" summary=".">
       <created>1641726946298</created>
       <option name="project" value="LOCAL" />
       <updated>1687259667913</updated>
     </task>
-    <option name="localTasksCounter" value="556" />
+    <option name="localTasksCounter" value="557" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
index 4c33dd3dfd991376169570973aaddb3b9aa96247..f0e2bfd43f2c8abcd33ef96dc23533d057ed8863 100644 (file)
@@ -39,7 +39,10 @@ function haGetState($id, $attribute = null) { //ID to read - for example sensor.
 }
 
 
-function haAction($id, $action = 'turn_on', $domain = null, $data = []) {
+function haAction($id, $action = null, $domain = null, $data = []) {
+       if (null === $action) {
+               $action = 'turn_on';
+       }
        $data['entity_id'] = $id;
        $opts = [
                "http" => [
index 1363ea63f66e759e0c8699888b951c83cca8b732..5decac0aabc7f4806f2c48a7079583cfba10d1f1 100644 (file)
@@ -484,63 +484,63 @@ $scenes = [
        'bureau/cinema' => [
                ['type' => 'scene', 'scene' => 'bureau/base/off'],
                ['type' => 'hue', 'group' => $bureau, 'scene' => '7mofVclWdtvpVyt'],
-               ['type' => 'domoticz', 'scene' => 25, 'command' => true, 'priority' => true],
+               ['type' => 'ha', 'device' => 'scene.bureau_cinema'],
        ],
        'bureau/lumineux' => [
                ['type' => 'hue', 'group' => $bureau, 'scene' => 'SdXwtZu5PCDjK2h'],
                ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'lumineux'],
                ['type' => 'scene', 'scene' => 'bureau/base/on'],
                ['type' => 'scene', 'scene' => 'bureau/screens/on'],
-               ['type' => 'domoticz', 'scene' => 26, 'command' => true, 'priority' => true],
+               ['type' => 'ha', 'device' => 'scene.bureau_lumineux'],
        ],
        'bureau/veilleuse' => [
                ['type' => 'hue', 'group' => $bureau, 'scene' => 'ooQq4Jfbf1CleDy'],
                ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'veilleuse'],
                ['type' => 'scene', 'scene' => 'bureau/base/on'],
                ['type' => 'scene', 'scene' => 'bureau/screens/on'],
-               ['type' => 'domoticz', 'scene' => 27, 'command' => true, 'priority' => true],
+               ['type' => 'ha', 'device' => 'scene.bureau_veilleuse'],
        ],
        'bureau/flowers' => [
                ['type' => 'hue', 'group' => $bureau, 'scene' => 'mJ-AVlYFyL5x1cN'],
                ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'flowers'],
                ['type' => 'scene', 'scene' => 'bureau/base/on'],
                ['type' => 'scene', 'scene' => 'bureau/screens/on'],
-               ['type' => 'domoticz', 'scene' => 28, 'command' => true, 'priority' => true],
+               ['type' => 'ha', 'device' => 'scene.bureau_flowers'],
        ],
        'bureau/videogames' => [
                ['type' => 'hue', 'group' => $bureau, 'scene' => 'ooQq4Jfbf1CleDy'],
                ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'veilleuse'],
                ['type' => 'scene', 'scene' => 'bureau/base/on'],
                ['type' => 'scene', 'scene' => 'bureau/screens/off'],
-               ['type' => 'domoticz', 'scene' => 29, 'command' => true, 'priority' => true],
+               ['type' => 'ha', 'device' => 'scene.bureau_videogames'],
        ],
        'bureau/tchernobyl' => [
                ['type' => 'hue', 'group' => $bureau, 'scene' => 'KoByn2ehWHDdchu'],
                ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'tchernobyl'],
                ['type' => 'scene', 'scene' => 'bureau/base/on'],
                ['type' => 'scene', 'scene' => 'bureau/screens/on'],
-               ['type' => 'domoticz', 'scene' => 30, 'command' => true, 'priority' => true],
+               ['type' => 'ha', 'device' => 'scene.bureau_tchernobyl'],
        ],
        'bureau/outrun' => [
                ['type' => 'hue', 'group' => $bureau, 'scene' => '9TzWQt6f7-EgVtm'],
                ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'outrun'],
                ['type' => 'scene', 'scene' => 'bureau/base/on'],
                ['type' => 'scene', 'scene' => 'bureau/screens/on'],
-               ['type' => 'domoticz', 'scene' => 31, 'command' => true, 'priority' => true],
+               ['type' => 'ha', 'device' => 'scene.bureau_outrun'],
        ],
        'bureau/boreal' => [
                ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'boreal'],
                ['type' => 'hue', 'group' => $bureau, 'scene' => 'dJaWFQBb0APEgtL'],
                ['type' => 'scene', 'scene' => 'bureau/base/on'],
                ['type' => 'scene', 'scene' => 'bureau/screens/on'],
-               ['type' => 'domoticz', 'scene' => 32, 'command' => true, 'priority' => true],
+               ['type' => 'ha', 'device' => 'scene.bureau_boreal'],
        ],
        'bureau/tropical' => [
                ['type' => 'hue', 'group' => $bureau, 'scene' => 'biXLpKpIZYDlxen'],
                ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'tropical'],
                ['type' => 'scene', 'scene' => 'bureau/base/on'],
                ['type' => 'scene', 'scene' => 'bureau/screens/on'],
-               ['type' => 'domoticz', 'scene' => 33, 'command' => true, 'priority' => true],
+               ['type' => 'ha', 'device' => 'scene.bureau_tropical'],
 
        ],
        'bureau/lounge' => [
@@ -548,7 +548,7 @@ $scenes = [
                ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'lounge'],
                ['type' => 'scene', 'scene' => 'bureau/base/on'],
                ['type' => 'scene', 'scene' => 'bureau/screens/on'],
-               ['type' => 'domoticz', 'scene' => 34, 'command' => true, 'priority' => true],
+               ['type' => 'ha', 'device' => 'scene.bureau_lounge'],
 
        ],
        'bureau/focus' => [
@@ -556,7 +556,7 @@ $scenes = [
                ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'space'],
                ['type' => 'scene', 'scene' => 'bureau/base/on'],
                ['type' => 'scene', 'scene' => 'bureau/screens/on'],
-               ['type' => 'domoticz', 'scene' => 35, 'command' => true, 'priority' => true],
+               ['type' => 'ha', 'device' => 'scene.bureau_focus'],
 
        ],
        'bureau/tonic' => [
@@ -564,7 +564,7 @@ $scenes = [
                ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'tonic'],
                ['type' => 'scene', 'scene' => 'bureau/base/on'],
                ['type' => 'scene', 'scene' => 'bureau/screens/on'],
-               ['type' => 'domoticz', 'scene' => 36, 'command' => true, 'priority' => true],
+               ['type' => 'ha', 'device' => 'scene.bureau_tonic'],
 
        ],
        'bureau/lecture' => [
@@ -572,7 +572,7 @@ $scenes = [
                ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'lecture'],
                ['type' => 'scene', 'scene' => 'bureau/base/on'],
                ['type' => 'scene', 'scene' => 'bureau/screens/on'],
-               ['type' => 'domoticz', 'scene' => 37, 'command' => true, 'priority' => true],
+               ['type' => 'ha', 'device' => 'scene.bureau_lecture'],
 
        ],
        'bureau/chillout' => [
@@ -580,7 +580,7 @@ $scenes = [
                ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'chillout'],
                ['type' => 'scene', 'scene' => 'bureau/base/on'],
                ['type' => 'scene', 'scene' => 'bureau/screens/on'],
-               ['type' => 'domoticz', 'scene' => 38, 'command' => true, 'priority' => true],
+               ['type' => 'ha', 'device' => 'scene.bureau_chillout'],
 
        ],
        'bureau/tamise' => [
@@ -588,14 +588,14 @@ $scenes = [
                ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'tamise'],
                ['type' => 'scene', 'scene' => 'bureau/base/on'],
                ['type' => 'scene', 'scene' => 'bureau/screens/on'],
-               ['type' => 'domoticz', 'scene' => 39, 'command' => true, 'priority' => true],
+               ['type' => 'ha', 'device' => 'scene.bureau_tamise'],
        ],
        'bureau/beach' => [
                ['type' => 'hue', 'group' => $bureau, 'scene' => '0mPAKOl-Kw8Fwb1'],
                ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'beach'],
                ['type' => 'scene', 'scene' => 'bureau/base/on'],
                ['type' => 'scene', 'scene' => 'bureau/screens/on'],
-               ['type' => 'domoticz', 'scene' => 40, 'command' => true, 'priority' => true],
+               ['type' => 'ha', 'device' => 'scene.bureau_beach'],
 
        ],
        'bureau/jellyfish' => [
@@ -603,7 +603,7 @@ $scenes = [
                ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'jellyfish'],
                ['type' => 'scene', 'scene' => 'bureau/base/on'],
                ['type' => 'scene', 'scene' => 'bureau/screens/on'],
-               ['type' => 'domoticz', 'scene' => 41, 'command' => true, 'priority' => true],
+               ['type' => 'ha', 'device' => 'scene.bureau_jellyfish'],
 
        ],
        'bureau/sharks' => [
@@ -611,11 +611,11 @@ $scenes = [
                ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'sharks'],
                ['type' => 'scene', 'scene' => 'bureau/base/on'],
                ['type' => 'scene', 'scene' => 'bureau/screens/on'],
-               ['type' => 'domoticz', 'scene' => 41, 'command' => true, 'priority' => true],
+               ['type' => 'ha', 'device' => 'scene.bureau_jellyfish'],
 
        ],
        'bureau/base/off' => [
-               ['type' => 'domoticz', 'scene' => 42, 'command' => false, 'priority' => true],
+               ['type' => 'ha', 'device' => 'scene.bureau_off'],
                ['type' => 'function', 'function' => 'bureauAuto', 'args' => [false]],
                ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'off'],
                ['type' => 'hue', 'group' => $bureau, 'scene' => array('on' => false)],
@@ -625,12 +625,6 @@ $scenes = [
                ['type' => 'scene', 'scene' => 'bureau/base/off'],
                ['type' => 'scene', 'scene' => 'bureau/pc/sleep'],
        ],
-       'bureau/sound/on' => [
-               ['type' => 'domoticz', 'device' => 24, 'switchtype' => 'scene', 'command' => true, 'priority' => true],
-       ],
-       'bureau/sound/off' => [
-               ['type' => 'domoticz', 'device' => 24, 'switchtype' => 'scene', 'command' => false],
-       ],
        'bureau/media/play' => [
                ['type' => 'state', 'key' => 'bureauPlaying', 'value' => '1'],
                ['type' => 'scene', 'scene' => 'bureau/screen/down'],
@@ -638,15 +632,12 @@ $scenes = [
                ['type' => 'scene', 'scene' => 'bureau/cinema'],
                ['type' => 'function', 'function' => 'bureauAuto', 'args' => [false]],
                ['type' => 'function', 'function' => 'harmonyActivity', 'args' => [HARMONY_TV]],
-               ['type' => 'scene', 'scene' => 'bureau/sound/on'],
-
        ],
        'bureau/media/stop' => [
                ['type' => 'state', 'key' => 'bureauPlaying', 'value' => '0'],
                ['type' => 'scene', 'scene' => 'bureau/screen/up'],
                ['type' => 'scene', 'scene' => 'bureau/rideaux/open'],
                ['type' => 'scene', 'scene' => 'bureau/auto'],
-               ['type' => 'scene', 'scene' => 'bureau/sound/off'],
        ],
        'bureau/screen/down' => [
                ['type' => 'domoticz', 'device' => '1', 'command' => 'Close', 'priority' => true],