04.05.2017, 17:56
(This post was last modified: 04.05.2017, 18:45 by Erwin van der Zwart.)
Hi,
Yes there is a small mistake in your script (see remarks inside the script)
So try:
PS: Not tested it so i hope it will work (:
BR,
Erwin
Yes there is a small mistake in your script (see remarks inside the script)
Code:
value = event.getvalue()
if value == true then -- first condition
for val = 0, 10 do
grp.write('Lys - Settverdi - 2 etg - Master Bedroom', val)
os.sleep(30)
if not value == true then -- it will always be true because of first condition
break
end
end
end
So try:
Code:
for val = 0, 10 do
value = grp.getvalue(event.dst)
if value == true then
grp.write('Lys - Settverdi - 2 etg - Master Bedroom', val)
os.sleep(30)
else
break
end
end
PS: Not tested it so i hope it will work (:
BR,
Erwin