20.04.2020, 11:17
Like this:
Your current script will fail with an error because you have single "-" instead of double dash for a comment.
This line will be evaluated an arithmetic expression "X = A - B / C"
Code:
event_value = event.getvalue()
summer = grp.getvalue('7/0/0') -- summer / winter
if event_value then
out_value = grp.getvalue('3/3/1')
else
out_value = 0
end
if summer then
out_addr = '6/0/91'
else
out_addr = '6/0/101'
end
grp.write('2/0/91', event_value)
grp.write(out_addr, out_value)
Your current script will fail with an error because you have single "-" instead of double dash for a comment.
This line will be evaluated an arithmetic expression "X = A - B / C"
Code:
value_3 = grp.getvalue ('7/0/0') - summer / winter