From fb3737dae8d10d5d4495e8d2bf340915aebe12d2 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 18 Jul 2023 19:11:07 +0200 Subject: [PATCH] . --- .idea/workspace.xml | 11 +++++++---- scripts/homeassistant_device_event.php | 1 + scripts/lib/homeassistant.php | 2 ++ scripts/lib/scenes.php | 4 ++++ 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 4d97b4e..a67e675 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,9 +5,10 @@ - - + + + diff --git a/scripts/homeassistant_device_event.php b/scripts/homeassistant_device_event.php index 3350661..e7df105 100644 --- a/scripts/homeassistant_device_event.php +++ b/scripts/homeassistant_device_event.php @@ -96,6 +96,7 @@ function cubeBureau() { execScene('bureau/rideaux/toggle', true); break; case 'flip180': + haAction(HA_OFFICE_MAIN_SCREEN); execScene('bureau/auto', true); break; case 'fall': diff --git a/scripts/lib/homeassistant.php b/scripts/lib/homeassistant.php index a0a1c38..c3b4d17 100644 --- a/scripts/lib/homeassistant.php +++ b/scripts/lib/homeassistant.php @@ -10,6 +10,8 @@ const HA_HOTTE = 'switch.hotte'; const HA_BAR = 'switch.bar'; const HA_PLANETARIUM = 'switch.0xa4c138788071821e'; +const HA_OFFICE_MAIN_SCREEN = 'switch.0xa4c138787633f01d'; +const HA_OFFICE_PLANE_SCREENS = 'switch.0xa4c138ba535d2cc5'; function haGetState($id, $attribute = null) { //ID to read - for example sensor.foo diff --git a/scripts/lib/scenes.php b/scripts/lib/scenes.php index 09153d6..d2c01b8 100644 --- a/scripts/lib/scenes.php +++ b/scripts/lib/scenes.php @@ -678,6 +678,8 @@ $scenes = [ ['type' => 'scene', 'scene' => 'sdb/hotwater/auto'], ['type' => 'scene', 'scene' => 'bureau/off'], ['type' => 'scene', 'scene' => 'chambre/off'], + ['type'=>'ha','device'=>HA_OFFICE_PLANE_SCREENS,'action'=>'turn_off'], + ['type'=>'ha','device'=>HA_OFFICE_MAIN_SCREEN,'action'=>'turn_off'], ], 'home/welcome/eco/homeoffice' => [ @@ -687,12 +689,14 @@ $scenes = [ ['type' => 'scene', 'scene' => 'sdb/hotwater/auto'], ['type' => 'scene', 'scene' => 'salon/off'], ['type' => 'scene', 'scene' => 'chambre/off'], + ['type'=>'ha','device'=>HA_OFFICE_PLANE_SCREENS,'action'=>'turn_off'], ], 'home/welcome' => [ ['type' => 'scene', 'scene' => 'cuisine/on'], ['type' => 'scene', 'scene' => 'salon/auto'], ['type' => 'scene', 'scene' => 'bureau/auto'], + ['type'=>'ha','device'=>HA_OFFICE_PLANE_SCREENS,'action'=>'turn_on'], ['type' => 'scene', 'scene' => 'chambre/auto'], ['type' => 'scene', 'scene' => 'sdb/on'], ['type' => 'scene', 'scene' => 'cour/auto'], -- 2.39.5