Voilà, voilà :
--[[
%% autostart
%% properties
%% weather
%% events
%% globals
JourChome
--]]
local sourceTrigger = fibaro:getSourceTrigger();
function tempFunc()
local currentDate = os.date("*t");
local startSource = fibaro:getSourceTrigger();
if (
( ((currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6) and string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min) == "07:00") and fibaro:getGlobalValue("JourChome") == "NON" )
)
then
fibaro:call(72, "pressButton", "1");
end
setTimeout(tempFunc, 60*1000)
end
if (sourceTrigger["type"] == "autostart") then
tempFunc()
else
local currentDate = os.date("*t");
local startSource = fibaro:getSourceTrigger();
if (
( (currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6) and fibaro:getGlobalValue("JourChome") == "NON" )
or
startSource["type"] == "other"
)
then
fibaro:call(72, "pressButton", "1");
end
end