20.02.2023, 08:36
Map this script to a binary object. 0/0/2 is a numeric output object that the script modifies in the 0..6 interval (7 total steps). false is step down, true is step up.
Code:
step = event.getvalue() and 1 or -1
curr = grp.getvalue('0/0/2') + step
curr = math.min(curr, 6)
curr = math.max(curr, 0)
grp.update('0/0/2', curr)