What script is more effective and takes less time and less resources to execute? Something like this:
I have many lights and many rooms and if I turn on ALL lights at the same time there are a lot of scripts executing at once, so I need the most perfomance-effective solution.
Quote:value = grp.getvalue('1address')Or this one:
value2 = grp.getvalue('2address)
value3 = grp.getvalue('3address')
output = 'outputaddress'
if(value or value2 or value3 == true) then
grp.write(output, true)
else
grp.write(output, false)
end
Quote:tagname = 'OR_LOGIC'
output = 'output_address'
for i, object in ipairs(grp.tag(tagname)) do
if object.data then
grp.checkwrite(output, true, 1)
return
end
end
grp.checkwrite(output, false, 1)
I have many lights and many rooms and if I turn on ALL lights at the same time there are a lot of scripts executing at once, so I need the most perfomance-effective solution.