--[[
%% autostart
%% properties
569 value
%% weather
%% events
%% globals
--]]
local sourceTrigger = fibaro:getSourceTrigger();
function tempFunc()
local currentDate = os.date("*t");
local startSource = fibaro:getSourceTrigger();
if (
( (math.floor(os.time()/60)-math.floor(1586239200/60))%60 == 0 and tonumber(fibaro:getValue(569, "value")) >= 24 )
)
then
fibaro:call(550, "turnOn");
fibaro:call(546, "turnOn");
end
setTimeout(tempFunc, 60*1000)
end
if (sourceTrigger["type"] == "autostart") then
tempFunc()
else
local currentDate = os.date("*t");
local startSource = fibaro:getSourceTrigger();
if (
( true and tonumber(fibaro:getValue(569, "value")) >= 24 )
or
startSource["type"] == "other"
)
then
fibaro:call(550, "turnOn");
fibaro:call(546, "turnOn");
end
end