(08.10.2018, 11:07)Bobby Wrote: Im trying to get a pump to work, only if come conditions are met.
I am not good at scripting, but tried to make this script, but doesnt work properly.
Can anyone advice?
value = grp.getvalue('1/5/1 or 1/5/2 or 1/5/3 or 1/5/4 or 1/5/5 or 1/5/6 or 1/5/7 or 1/5/8 or 1/5/9 or 1/5/10')
if (value == "on") then
grp.write('1/4/23', true)
else grp.write('1/4/23', false)
end
Function grp.getvalue() returns true or false not "on" of "off".
Function grp.getvalue() takes only one group address so it should be:
Code:
value = grp.getvalue('1/5/1') or grp.getvalue('1/5/2') -- and others values
grp.write('1/4/23', value)
Done is better than perfect