Hue Bridge, ST and resetting to last colour used

Ok, here’s the scenario:

Two motion sensors, #1 and #2. One Hue bulb (colour).
Person walks past #1, Hue turn on/blue for 2 seconds
Person walks past #2, Hue turn on/red for 2 seconds

Seems simple? If the Hue is at white with no movement, it’s fine. Person walks past (slowly), it will go from white to blue (or red), and return to white (or off depending on initial state).

Here’s the problem, if the person moves between #1 and #2 quickly within the 2 second window…

Light white
Sensor #1, motion; light blue
Sensor #2, motion; light red
Light red.

… Problem seems to be that when a new event is triggered while one is already in progress, as it looks at the current light values before setting the new one. So it reverts back to the wrongly noted colour after the event. Instead of reverting back to white it will go from red to blue.

Not sure if anyone else has experienced this or connecting Hue bulbs directly to ST will fix this issue… any suggestions welcome.

Set up the motion events to run only when the state of something is false / off.

If you have Rule Machine, try using a private boolean flag. If you don’t, try using a virtual switch.

In either case, have your two motion event rules trigger only if the boolean is false / virtual switch is off. If either motion event runs, then (1) set light to color you want, (2) set boolean to true / virtual switch to on, and (3) using a delay of [X time], set boolean to false / virtual switch to off.

Excellent, I haven’t installed Rule Machine yet, will install it tonight (still a bit green with installing stuff–fingers crossed).

Thanks for your prompt reply.

I was looking for Rule Machine, found this:

… but the links aren’t working. I’m sure I read that the author has removed the SmartApp?

That’s why I said IF you had Rule Machine… :sunglasses:

Oh right, that’s a no then.

Then try using virtual switch option.

@mjn, which app do you use to set the color of use when motion is triggered, and then back to the color that it was previously after motion stops?

It’s the “Notify me with Hue” SmartApp, one of the supplied apps.