Forum użytkowników automatyki budynkowej

Z-wave => Fibaro - skrypty itp => Wątek zaczęty przez: zimas w Luty 15, 2017, 06:58:17 pm

Tytuł: dlaczego nie działa
Wiadomość wysłana przez: zimas w Luty 15, 2017, 06:58:17 pm
--[[
%% autostart
%% properties
%% weather
%% events
%% globals
--]]

local sourceTrigger = fibaro:getSourceTrigger();
function tempFunc()
local currentDate = os.date("*t");
local startSource = fibaro:getSourceTrigger();
if (
 ( ((currentDate.wday == 1 or currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6 or currentDate.wday == 7) and string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min) == "07:24") )
)
then
   fibaro:call(376, "turnOn");
end

setTimeout(tempFunc, 60*1000)
end
if (sourceTrigger["type"] == "autostart") then
tempFunc()
else

local currentDate = os.date("*t");
local startSource = fibaro:getSourceTrigger();
if (
startSource["type"] == "other"
)
then
   fibaro:call(376, "turnOn");
end

end
Tytuł: Odp: dlaczego nie działa
Wiadomość wysłana przez: confesor w Luty 15, 2017, 10:18:46 pm
ale co ci nie dziala?? wlaczanie swiatla rano??