<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="1773390371781" duration="506000" />
<workItem from="1774028822942" duration="792000" />
<workItem from="1774430967346" duration="6359000" />
- <workItem from="1774441121722" duration="7403000" />
+ <workItem from="1774441121722" duration="7518000" />
</task>
<task id="LOCAL-00502" summary=".">
<created>1641726946298</created>
<option name="project" value="LOCAL" />
<updated>1687259667913</updated>
</task>
- <option name="localTasksCounter" value="645" />
+ <option name="localTasksCounter" value="646" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
'chambre/bed' => [
['type' => 'scene', 'scene' => 'chambre/bed/base'],
['type' => 'scene', 'scene' => 'chambre/nightlights'],
- ['type' => 'scene', 'scene' => 'chambre/planetarium/on'], // Planétarium on
+ ['type' => 'scene', 'scene' => 'chambre/planetarium/on'],
['type' => 'scene', 'scene' => 'sdb/nuit'],
['type' => 'scene', 'scene' => 'chambre/cheminee/smallfire'],
],
['type' => 'function', 'function' => 'bedbrightness', 'args' => [$bedlowscreenbrightness]],
['type' => 'scene', 'scene' => 'chambre/rideaux/close'],
['type' => 'scene', 'scene' => 'sdb/off'],
- ['type' => 'scene', 'scene' => 'chambre/planetarium/on'], // Planétarium on
- ['type' => 'delay', 'scene' => 'chambre/planetarium/off', 'delay' => 3600], // Planétarium off dans une heure
+ ['type' => 'scene', 'scene' => 'chambre/planetarium/on'],
],
'chambre/sleep' => [
['type' => 'scene', 'scene' => 'chambre/cheminee/smallfire'],
'chambre/toggle' => [
['type' => 'function', 'function' => 'chambreToggle'],
],
- 'chambre/planetarium/off' => [
- ['type' => 'function', 'function' => 'planetarium', 'args' => [false]],
- ],
- 'chambre/planetarium/on' => [
- ['type' => 'function', 'function' => 'planetarium', 'args' => [true]],
- ],
'chambre/vincent/lecture' => [
['type' => 'hue', 'light' => $litvincent, 'scene' => array('on' => true, 'brightness' => 35, 'colorTemp' => 346, 'transitionTime' => 10)],
],
}
}
-function planetarium($on)
-{
- setState('planetarium', $on ? '1' : '0');
- checkPlanetarium(false);
-}
-
-function checkPlanetarium($periodicOffCheck = true)
-{
- $on = getState('planetarium') == '1';
- $h = date('G');
- if ($h >= 2 && $h <= 20) {
- $on = false;
- }
- if ($on) {
- if ($periodicOffCheck) {
- $min = intval(date('i'));
- if ($min % 30 == 0) {
- haAction(HA_PLANETARIUM, 'turn_off');
- sleep(5);
- }
- }
- haAction(HA_PLANETARIUM);
- } else {
- haAction(HA_PLANETARIUM, 'turn_off');
- }
-}
-
function cheminee($lightId, $room = 'salon', $program = 'fire', $brightness = 1)
{
$start = time();