23.02.2019, 14:02
(22.02.2019, 22:09)gtsamis Wrote: The event script should run on proximity sensor GA.thanks George!
Does the feedback object works correctly? Are you trying to toggle it too fast?
Try changing the code as below in order to give it some time to update the feedback object
Code:--Get proximity value
value=event.getvalue()
-- 'Light Feedback' is the address/name of the actual state of the load
lightFB = grp.read('Light Feedback')
os.sleep(0.5)
-- 'Light OnOff' is the address/name of the actual load
if value then
lightFB = grp.getvalue('Light Feedback')
grp.write('Light OnOff', not lightFB)
end
If it doesn't work give me a call
BR
George