09.04.2020, 06:39
This example will set out_value depending on input temperature. This should be an event script attached to temperature sensor object so it executes each time temperature value changes.
Code:
value = event.getvalue()
if temp >= 24 then
out_value = 1
elseif temp >= 15 then
out_value = 2
elseif temp >= 10 then
out_value = 3
else
out_value = 4
end
grp.write('3/5/37', out_value)