Народ, подскажите пожалуйста в чем может быть дело.
local tNotBefore = "06:49"
local tHour, tMin = string.match(tNotBefore,"(%d+)
%d+)") -- Note: this line has an unwanted extra space after the ): because the editor wants to put in a
, space should be removed if you use code
local mNotBefore = (tHour * 60) + tMin
local tNow = os.date("*t")
if (tNow.wday == 1) then
-- Saturday or Sunday, Run as scheduled
return true
else
local mNow = (tNow.hour * 60) + tNow.min
if (mNow >= mNotBefore) and not luup.is_night() then
-- After sunrise and after 06:50am, open blinds
return true
else
-- Either before sunrise or before 06:50, do not open blinds
return false
end
end
Все работает и открывает их в 6-50. Но ведь сейчас каникулы и можно открывать попозже, а нет - меняю 6 на 7 и того вообще не открываются). Вот ничего более не меняю и все ломается.