From 44bd0a537eb913c0ae0629c547d64794d92ec951 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 27 Mar 2026 14:16:49 +0100 Subject: [PATCH] . --- .idea/workspace.xml | 12 ++++------ config/rooms.php | 5 ----- scripts/cron/cron.php | 3 --- scripts/insteon.php | 9 -------- scripts/lib/automodes.php | 37 ------------------------------- scripts/lib/homeassistant.php | 1 - scripts/lib/scenes.php | 41 +---------------------------------- 7 files changed, 5 insertions(+), 103 deletions(-) delete mode 100644 scripts/insteon.php diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 7d373bf..b7b401f 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -6,16 +6,12 @@ - + - + - - - - diff --git a/config/rooms.php b/config/rooms.php index af7a520..7e94afc 100644 --- a/config/rooms.php +++ b/config/rooms.php @@ -217,11 +217,6 @@ function cour() function balcon() { $favorites = [ -// ['type' => 'light', 'scene' => 'cour/on', 'label' => 'Allumer'], -// ['type' => 'light', 'scene' => 'cour/off', 'label' => 'éteindre'], -// ['type' => 'separator', 'label' => 'Projecteurs'], -// ['type' => 'light', 'scene' => 'cour/projecteurs/on', 'label' => 'Allumer'], -// ['type' => 'light', 'scene' => 'cour/projecteurs/off', 'label' => 'éteindre'], ]; $all = array_merge($favorites, [ diff --git a/scripts/cron/cron.php b/scripts/cron/cron.php index 0509530..bc15521 100644 --- a/scripts/cron/cron.php +++ b/scripts/cron/cron.php @@ -72,9 +72,6 @@ function cronRooms($cronmin) _logSection('Chambre'); updateChambreAuto(); - _logSection('Cour'); - updateCourAuto(); - _logSection('Salon'); updateSalonAuto(); diff --git a/scripts/insteon.php b/scripts/insteon.php deleted file mode 100644 index 8b7d727..0000000 --- a/scripts/insteon.php +++ /dev/null @@ -1,9 +0,0 @@ -= 7 && $h <= 21) { - execScene('cour/projecteurs/off'); - } - if (getState('courOff') == '1') { - execScene('cour/off'); - return; - } - if (getState('courAutoMode') != '1') { - return; - } - if (isDay()) { - $scene = 'daylight'; - } else { - $scene = 'lumineux'; - } - execScene('cour/' . $scene); -} - function salonAuto($on = true) { if ($on) { @@ -135,16 +108,6 @@ function bureauAuto($on = true) } } -function courAuto($on = true) -{ - if ($on) { - setState('courAutoMode', '1'); - updateCourAuto(); - } else { - setState('courAutoMode', '0'); - } -} - function updateSalonAuto() { if (!isAutoModeEnabled()) { diff --git a/scripts/lib/homeassistant.php b/scripts/lib/homeassistant.php index 653bdd8..ff0d812 100644 --- a/scripts/lib/homeassistant.php +++ b/scripts/lib/homeassistant.php @@ -10,7 +10,6 @@ const HA_ECO_BASIC = 'switch.ecomode_basic'; 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_OFFICE_CURTAIN = 'input_boolean.rideaux_bureau'; const HA_OFFICE_SCREEN = 'cover.office_screen'; diff --git a/scripts/lib/scenes.php b/scripts/lib/scenes.php index bb293f2..aa2c922 100644 --- a/scripts/lib/scenes.php +++ b/scripts/lib/scenes.php @@ -9,7 +9,6 @@ $salon = 3; $cuisine = 8; $bureau = 13; $sdb = 14; -$cour = 11; $freebox = 19; @@ -218,10 +217,8 @@ $scenes = [ ['type' => 'hue', 'light' => $litvincent, 'scene' => array('on' => true, 'brightness' => 20, 'hue' => 0, 'saturation' => 255, 'transitionTime' => 1)], ], 'chambre/vincent/crepuscule' => [ - // ['type' => 'insteon', 'command' => '3?0262261ED00F1300=I=3'], ['type' => 'hue', 'light' => $litvincent, 'scene' => array('on' => true, 'brightness' => 60, 'hue' => '0', 'saturation' => 255, 'transitionTime' => 10)], ['type' => 'hue', 'light' => $litvincent, 'scene' => array('on' => false, 'brightness' => 0, 'transitionTime' => 10 * 60)], - //['type' => 'insteon', 'command' => '3?0262261ED00F11FF=I=3'], ], 'chambre/vincent/aube' => [ ['type' => 'hue', 'light' => $litvincent, 'scene' => array('on' => true, 'brightness' => 0, 'hue' => '46920', 'saturation' => 255, 'transitionTime' => 0)], @@ -302,17 +299,10 @@ $scenes = [ ['type' => 'ha', 'device' => 'scene.salon_off'], ['type' => 'hue', 'group' => $salon, 'scene' => array('on' => false)], ['type' => 'state', 'key' => 'salon', 'value' => 'off'], - //['type' => 'insteon', 'command' => '0?133=I=0=0'], ['type' => 'function', 'function' => 'chemineeOff', 'args' => ['salon']], ['type' => 'hue', 'group' => $salon, 'scene' => array('on' => false)], ['type' => 'scene', 'scene' => 'salon/bar/off'], ], - 'salon/cinemabase' => [ - - // ['type' => 'scene', 'scene' => 'cuisine/tamise'], - // ['type' => 'ecomode', 'mode' => '0'], - // ['type' => 'insteon', 'command' => '0?1111=I=0=0'], - ], 'salon/cineclub' => [ ['type' => 'scene', 'scene' => 'salon/bar/off'], ['type' => 'function', 'function' => 'salonAuto', 'args' => [false]], @@ -344,7 +334,6 @@ $scenes = [ ['type' => 'ecomode', 'mode' => '0'], ['type' => 'hue', 'group' => $salon, 'scene' => 'xWNIeznSzek8dKS', 'repeat' => 2], ['type' => 'state', 'key' => 'salon', 'value' => 'theatre'], - // ['type' => 'insteon', 'command' => '0?1130=I=0=0'], ['type' => 'function', 'function' => 'chemineeOn', 'args' => ['salon', 'fire', 0.8]], ['type' => 'scene', 'scene' => 'cuisine/on', 'repeat' => 2], ], @@ -353,7 +342,6 @@ $scenes = [ ['type' => 'ha', 'device' => 'scene.salon_lecturenocturne'], ['type' => 'hue', 'group' => $salon, 'scene' => 'HZiYyM6hMUMkmiY'], ['type' => 'state', 'key' => 'salon', 'value' => 'tamise'], - // ['type' => 'insteon', 'command' => '0?1113=I=0=0'], ['type' => 'function', 'function' => 'chemineeOn', 'args' => ['salon', 'fire', 0.25]], ['type' => 'scene', 'scene' => 'cuisine/on', 'repeat' => 2], ['type' => 'scene', 'scene' => 'salon/bar/off'], @@ -571,9 +559,6 @@ $scenes = [ 'bureau/rideaux/toggle' => [ ['type' => 'function', 'function' => 'bureauRideau', 'args' => ['toggle']], ], - 'insteon/off' => [ - // ['type' => 'insteon', 'command' => '0?135=I=0=0'], - ], 'home/off' => [ ['type' => 'scene', 'scene' => 'home/hueoff'], ['type' => 'ecomode', 'mode' => '2'], @@ -687,30 +672,6 @@ $scenes = [ 'cuisine/coffee/off' => [ ['type' => 'ha', 'device' => HA_COFFEE, 'command' => 'turn_off'], ], - 'cour/auto' => [ - ['type' => 'function', 'function' => 'courAuto', 'args' => [true]], - ], - 'cour/daylight' => [ - ['type' => 'ha', 'device' => 'scene.cour_daylight'], - ], - 'cour/lumineux' => [ - ['type' => 'ha', 'device' => 'scene.cour_light'], - ], - 'cour/tropical' => [ - ['type' => 'ha', 'device' => 'scene.cour_tropical'], - ], - 'cour/grow' => [ - ['type' => 'ha', 'device' => 'scene.cour_grow'], - ], - 'cour/off' => [ - ['type' => 'ha', 'device' => 'scene.cour_off'], - ], - 'cour/projecteurs/on' => [ - ['type' => 'ha', 'device' => HA_GROW_LAMPS], - ], - 'cour/projecteurs/off' => [ - ['type' => 'ha', 'device' => HA_GROW_LAMPS, 'command' => 'turn_off'], - ], 'ecomode/basic' => [ ['type' => 'ha', 'device' => HA_ECO_BASIC, 'command' => 'turn_off'], ], @@ -765,7 +726,7 @@ function execScene($name, $fromUserAction = false, $transitionTime = null) $e = explode('/', $name); - $autoRooms = ['bureau', 'chambre', 'salon', 'cour']; + $autoRooms = ['bureau', 'chambre', 'salon']; if (in_array($e[0], $autoRooms) && count($e) == 2) { setState($e[0] . 'Off', $e[1] === 'off' ? '1' : '0'); -- 2.39.5