--[[ %% properties 402 value %% events %% globals TimeOfDay --]] local startSource = fibaro:getSourceTrigger(); if ( ( fibaro:getGlobalValue("TimeOfDay") == "Morning" or fibaro:getGlobalValue("TimeOfDay") == "Day" or fibaro:getGlobalValue("TimeOfDay") == "Evening" ) and ( tonumber(fibaro:getValue(402, "value")) > 0 ) or startSource["type"] == "other" ) then fibaro:call(396, "close"); setTimeout(function() fibaro:call(396, "stop"); end, 7000) end