Code: Select all
-- script_time_lux1.lua
commandArray = {}
time = os.date("*t")
if((time.min % 1)==0)then
L4 = tonumber(uservariables['Light_A'])
s = tonumber(otherdevices_svalues['Avg_LUX'])
-- The following statement is not working!
if L4 < 1000 then
commandArray['Scherm_uit'] = 'Off'
else
commandArray['Scherm_uit'] = 'On'
end
end
return commandArray
The if statement that checks if L4 is lower than 1000 is not working.
Anyone knows why?