<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/denon.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/denon.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/config/rooms.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/rooms.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/domoticz_device_event.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/domoticz_device_event.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/scenes.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/scenes.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/switchbot.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/switchbot.php" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<workItem from="1666856719410" duration="668000" />
<workItem from="1666880430659" duration="1177000" />
<workItem from="1667037570905" duration="1563000" />
- <workItem from="1667739527547" duration="1278000" />
- </task>
- <task id="LOCAL-00491" summary=".">
- <created>1639181242353</created>
- <option name="number" value="00491" />
- <option name="presentableId" value="LOCAL-00491" />
- <option name="project" value="LOCAL" />
- <updated>1639181242355</updated>
+ <workItem from="1667739527547" duration="1293000" />
+ <workItem from="1668006276656" duration="977000" />
</task>
<task id="LOCAL-00492" summary=".">
<created>1639205467698</created>
<option name="project" value="LOCAL" />
<updated>1667037724618</updated>
</task>
- <option name="localTasksCounter" value="540" />
+ <task id="LOCAL-00540" summary=".">
+ <created>1667752233866</created>
+ <option name="number" value="00540" />
+ <option name="presentableId" value="LOCAL-00540" />
+ <option name="project" value="LOCAL" />
+ <updated>1667752233866</updated>
+ </task>
+ <option name="localTasksCounter" value="541" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
['type' => 'light', 'scene' => 'salon/tamise', 'label' => 'Tamisé'],
['type' => 'light', 'scene' => 'salon/lecturenocture', 'label' => 'Lecture nocturne'],
['type' => 'light', 'scene' => 'salon/cheminee', 'label' => 'Cheminée'],
+ ['type' => 'light', 'scene' => 'salon/theatre', 'label' => 'Théâtre'],
['type' => 'light', 'scene' => 'salon/bar/toggle', 'label' => 'Bar'],
];
$all = array_merge($favorites, [['type' => 'separator', 'label' => 'Projecteur'],
require_once "import.php";
-
if ($device === 6894) {
domoticzCmd(6898, 'Toggle');
} elseif ($device == 6895) {
setState('wc', 1);
break;
case 'Long_Click':
- execScene('home/alert', true);
+ if (isJerome(false) && isVincent()) {
+ execScene('home/alert', true);
+ } else {
+ wcToggle();
+ }
break;
case 'Click':
default:
['type' => 'function', 'function' => 'chemineeOn', 'args' => ['salon', 'fire', 0.8]],
['type' => 'scene', 'scene' => 'cuisine/on', 'repeat' => 2],
],
+ 'salon/theatre' => [
+ ['type' => 'ecomode', 'mode' => '0'],
+ ['type' => 'domoticz', 'scene' => 53, 'command' => true, 'priority' => true],
+ ['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],
+ ],
'salon/lecturenocture' => [
['type' => 'function', 'function' => 'salonAuto', 'args' => [false]],
['type' => 'domoticz', 'scene' => 49, 'command' => true, 'priority' => true],
return true;
}
-function isJerome()
+function isJerome($strict = true)
{
- return remember('jerome_in_paris', 3600, function () {
- return _isJerome();
+ $key = 'jerome_in_paris' . ($strict ? '' : '_1');
+
+ return remember($key, 3600, function () use ($strict) {
+ return _isJerome($strict);
}, true);
}
-function _isJerome()
+function _isJerome($strict = true)
{
$today = new DateTime('now');
$yesterday = new DateTime('now');
$tomorrow = new DateTime('now');
$tomorrow->add(new DateInterval('P1D'));
- $dates = [$yesterday, $today, $tomorrow];
+ $dates = $strict ? [$yesterday, $today, $tomorrow] : [$today];
foreach ($dates as $date) {
$events = searchIcalEventDay('dplacements-jrme', $date);