Forum użytkowników automatyki budynkowej
Z-wave => Fibaro - sceny => Wątek zaczęty przez: wojtas810 w Lipiec 07, 2016, 11:04:14 pm
-
Witam
macie jakąś podpowiedz co jest nie tak w kodzie że mi się lampka o danej godzinie nie chcę wyłączyć ?
--[[
%% properties
%% 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) == "23:45") )
)
then
fibaro:call(174, "turnOff");
end
setTimeout(tempFunc, 30*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(174, "turnOff");
end
end
-
brak autostartu sceny
-
Hehe
Dzięki :)
-
w 2 innych scenach dokładnie ten sam błąd :)
Jeszcze raz dzięki