SmartThings Hub & Motion Sensor, IFTTT & Lutron Caseta

I really like the engineering on Lutron Caseta. :sunglasses: If IFTTT isn’t introducing too much lag for you, that’s great.

As far as how to do it, as you undoubtedly noticed, there’s no ā€œinactionā€ if trigger for the smartthings channel, which is too bad.

You can still do it, but basically you have to have a SmartThings event that turns on a virtual switch after Inactivity, and then use that switch coming on to be your ā€œif.ā€

I know there was an intention to add that to smart lighting, I just honestly don’t remember if it’s there.

If it’s not, there is some custom code that will do it:

If you haven’t used custom code was smart things before, here’s the FAQ for that:

First, though, I would check to see if the feature is available through smart lighting.

So this would be the steps:

  1. create a virtual switch. Personally I would use a momentary button tile, because then it will always turn itself off again so it’s ready for the next use. But that’s up to you.
  1. once you have that virtual switch created, make an IFTTT recipe that will turn off your Lutron Caseta light when that virtual switch comes on.

  2. Now just add the code into SmartThings to turn the virtual switch on when there is an activity on the motion sensor.

Another way: create a binary virtual switch to ā€œshadowā€ The Lutron switch, so that it is on when that switch is on and off when that which is off

I should note that if you find it easier to think of, you can also set it up so that the virtual switch gets turned off when there is an activity, not on. That way the virtual switch can represent the Caseta switch state.

If you want to do it that way, use a virtual binary switch instead of a momentary, and just make sure that you turn on the virtual switch with its own recipe whenever you turn on the Caseta switch. You can use the same motion detected trigger for both recipes.