SmartThings Community

CoRE Assistance


(Gene Clark) #1

Hello I have the following piston created and I was hoping that I could get some assistance with it. The goal I’m trying to accomplish is to have a motion sensor turn on a light for two minutes, but used CoRE because before if the light was already on the regular routine I had setup caused the light to time out and changed brightness. Now my issue is that if the motion sensor triggers the light and I turn it off and then back on before the two minutes are up and then it will turn it back off when the two minutes expire. How can I get it so that it stays on?

Sorry if this is confusing.


#2

You will get the quickest answer if you post your question to the end of the Core peer assistance thread. That’s where most of the core experts hang out. :sunglasses:


(Dustin Clark) #3

Your best bet will be splitting your actions up into a latching piston like above. You can substitute your condition of the light being off where I have the mode selection. I would also move the time into the IF section instead of under the action section.


(Gene Clark) #4

So this is what I came up with let me know if those coincides with what you suggested:

The problem is that when trying this way I literally cannot shut my light off - it will go off and be come right back on.


(Ron Talley) #5

Think about it this way,

If light is off, then turn on!

That is what you first argument says…

So when the But-If turns the light off, then the first argument turns it right back on.

You have to add

If “motion is active” to the First argument


(Gene Clark) #6

Duh my bad.


(Ron Talley) #7

Hey, it happens. :slight_smile:


(Dustin Clark) #8

To add to above you can condense the two times and use if time is between sunset and sunrise