dlaczego nie działa

  • 1 Odpowiedzi
  • 2184 Wyświetleń

0 użytkowników i 1 Gość przegląda ten wątek.

*

Offline zimas

  • * 20
  • 0
dlaczego nie działa
« dnia: 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
*

Offline confesor

  • ** 82
  • 1
  • Nazwa i wersja ID: Hc2 4.056/4.100 HCLite/ bluboc/Samsung
Odp: dlaczego nie działa
« Odpowiedź #1 dnia: Luty 15, 2017, 10:18:46 pm »
ale co ci nie dziala?? wlaczanie swiatla rano??