Increase Dimmer with Motion, But

I also need to decrease it after x minutes, or when motion stops. Anyone know how to do this? Turning on or setting new dimmer value after motion is easy.


I have two Hue outdoor lights that I leave at 50%. For security, I’d like to increase them to 100% when motion is detected on the Hue outdoor motion sensor, and then decrease the lighting back to 50% after 5 minutes or something. The first half is easy, but I only see an option to turn off after x minutes, not change dimmer level. I’m using a ST v2 hub.

I do this with WebCore.


WebCoRE is the answer to this scenario and many others. Highly recommend that you start using it as soon as possible. It will make your life much easier an you won’t regret it.


That’s perfect, and thanks for the code! I haven’t coded in 20 years but this looks simple enough to modify. I’ll do some searching for WebCore now.

1 Like

Webcore is essentially a scripting language for smartThings. Community-created, it is very powerful. And there are many community members who will be glad to help you if you get stuck on anything. They even have their own forum.

See the FAQ: (the topic title is a clickable link)

1 Like

I do the exact thing with a simpler solution. I have an automation that will turn my porch light to 100% for 10 minutes if the Ring detect motion sunset-sunrise. I created a second automation to take care of turning the lights back on. Basically the second automation says if porch light is off sunset-sunrise (which it is 10 min after motion), turn it back on to whatever setting (50% in your case)…


Oh nice, that would work too. I think I’m going to take a look at scripting, as I’d like to receive alerts that state specifically which device threw the alert, rather than just which zone that I currently have.

1 Like

My script has “evolved” over time and most certainly not the most efficient use of code. I have also had some issues with timed events recently so I wanted to keep it simple. I try to start with my intent and work backwards to the code. I can always look to optimise later.

  1. Turn on at 30% at sunset
  2. Between sunset and midnight, increase to 100% on motion
  3. Between sunset and midnight, reduce to 30% when motion has stoped for 2 minutes
  4. Turn off at 10 mins after midnight.

I find the rules piece the mot interesting and challenging part of home automation. Good luck with yours!

1 Like