This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

fade time function
#5
Here's a basic solution - map event script to a binary object, set execution mode to "Last instance only". Sending TRUE will dim from 0% to 100%, sending FALSE will dim from 100% to 0%. Change group addresses as needed. 0/0/21 is the light output group address, 0/0/24 is the fade time in minutes.

Code:
value = event.getvalue()

out = '0/0/21'
time = grp.getvalue('0/0/24')
sleeptime = time * 60 / 100

for i = 0, 100 do
  grp.write(out, value and i or (100 - i))
  os.sleep(sleeptime)
end
Reply


Messages In This Thread
fade time function - by Danny - 12.02.2026, 11:05
RE: fade time function - by Daniel - 12.02.2026, 11:07
RE: fade time function - by Danny - 12.02.2026, 11:10
RE: fade time function - by Daniel - 12.02.2026, 11:12
RE: fade time function - by admin - 13.02.2026, 07:59

Forum Jump: