Is there a way to reset a trigger state? I have a trigger setup for PIN entry on a Kwikset lock that turns on my foyer light if night. The problem is, once a PIN is entered, the trigger remains true, so at night, every night, the foyer light comes on.
Trigger
frontDoorPinUnlock PIN Code #2 is entered on Front Door
Condition
_foyerLightOn Yes isNight AND frontDoorPinUnlock
I may have found what I am looking for - [url=http://forum.micasaverde.com/index.php/topic,23985.0.html]http://forum.micasaverde.com/index.php/topic,23985.0.html[/url]
I changed my condition to:
_foyerLightOn Yes isNight AND (frontDoorPinUnlock AND (frontDoorPinUnlock; NOW < 1:30))
The following will work and is more efficient (Not using NOW)
_foyerLightOn Yes IsNight and (IsNight; frontDoorPinUnlock)
The above will be true if its night and the front door pin is opened after night started.
You can also rename the condition to remove the _ … it’s not needed anymore. It’s not replaced by the explicit repeat checkbox.
It’s OK to leave it there.
[quote=“RichardTSchaefer, post:3, topic:180344”]The following will work and is more efficient (Not using NOW)
_foyerLightOn Yes IsNight and (IsNight; frontDoorPinUnlock)
The above will be true if its night and the front door pin is opened after night started.
You can also rename the condition to remove the _ … it’s not needed anymore. It’s not replaced by the explicit repeat checkbox.
It’s OK to leave it there.[/quote]
Thanks Richard. I’ll give that a shot.
Would the following logic work for 2 triggers?
_foyerLightOn isNight AND (isNight; (frontDoorPinUnlock OR frontDoorPinUnlock3))
Nope, LUA didn’t like that statement. I changed it to:
foyerLightOn Yes isNight AND ((isNight; frontDoorPinUnlock) OR (isNight; frontDoorPinUnlock3))
I’ll see how that goes.
just remember that you have to check the Repeats box on the condition and you should be good.
Yep, I already had that configured.
So I tested my updated logic based on Richard’s recommendation and it works as intended.
Thanks Richard.