Page 1 of 1

Help with Lua script please

Posted: Tuesday 10 May 2016 17:34
by markk
I had an event in blockly to run if no one was home and the front or back door sensor was triggered but, because my door sensors are always "on" and you can't (as far as I'm aware) define "other devices" or "device changed" in blockly, it run true every time the last person left the house and the "someone home" switch turned off.

So, I tried to do the same thing with lua using the script below but it runs true even if "someone home" is "on". I can't see what I have done wrong.
image.jpeg
image.jpeg (115.07 KiB) Viewed 894 times

Re: Help with Lua script please

Posted: Tuesday 10 May 2016 19:10
by mrf68
Remove first ( and place it in front of the other ( after 'and' .

Re: Help with Lua script please

Posted: Tuesday 10 May 2016 19:22
by manjh
sensors remain on because no off signal is sent.
Edit the device and set the "off delay" to a value like 5 or so. That way the sensor will turn off by itself.

Re: Help with Lua script please

Posted: Tuesday 10 May 2016 20:07
by markk
@mrf68 thanks for that. much appreciated. you wouldn't believe how long that has had me stumped.

Re: Help with Lua script please

Posted: Tuesday 10 May 2016 20:08
by markk
@manjh - they are SelectPlus motion sensors. for some reason, unknown to me, the off delay has not effect. they just stay on!