Trying to duplicate a smart lighting feature in an automation

In the smart lighting app, you have an option to turn off a light if the motion sensor is not detecting motion after certain number minutes.

Is there a way to do this with an automation? Or do I have to make 2 automations to replicate what would otherwise be one rule in smart lighting.

I do know with an automation, you can have the light auto turn off after a certain amount of time, but what about after motion stops? What do we do about that?

Thanks.

If - sensor - motion sensor - no motion - stays this status for

The auto off would be another automation

ā€˜Stays this status forā€™ currently makes the automation not eligible for local processing.

2 Likes

So that automation will turn off the light after 10 minutes of no motion.

But I still need a second automation to turn them on with motion.

I am trying to do it all with one ā€œruleā€.

Kind of like smart lighting

Not currently possible in one rule with the default automation creator. Rules API can handle it but youll need to know the rules api, have built a personal token and know how to construct the JSON.

1 Like

This why I still hang on to WebCoRE and smart lighting. I know those are going away eventually though.

1 Like

My first effort is killing Smartlighting i have one mirror rule left that i cant delete yet.

WebCoRE well. Ive always reserved that for my most complex stuff. Many of my pistons are hundreds of lines long. Thatā€™s going to need me to either learn RulesAPI or have a RulesAPI rule editor.

I think Iā€™d rather stick with more automations and leave the rules API for the future.

Trying the same thing. I got everything except the room switches because of the turn off with motion issue and the mirroring rules mainly because Iā€™m being lazy. Glad this got asked, though, I was coming here to ask the exact same question.

1 Like

Took some work and a few logic workarounds, but Iā€™m officially off webCoRE and SmartLighting as of tonight. As far as I can tell, Iā€™m using only stock ST stuff now. (Well, Iā€™m not sure about ActionTiles, but the other stuff should be connected services through the ST approved methods.) I donā€™t even think I lost anything.

I ended up not needing a virtual switch that I had been using with webCoRE, and I repurposed it to handle the one issue I had running a scene to keep the lighting automation local and the scene itself in the cloud (LIFX bulbs, so the mirroring would have been cloud based anyways).

As far as straight up on and off, the automations seem maybe a tad faster/smoother than the SmartLighting mirror rules, but that may just be wishful thinking on my part too. :man_shrugging: I donā€™t have too many lights that I dim much, so that helped as a lot of the mirroring was just on and off. Iā€™m sure thatā€™s not the case for everyone.

1 Like

My biggest issue with attempting to move some of my Smart Lighting Routines over to Automations is that Smart Lighting letā€™s me select ā€˜multipleā€™ devices very easily where Automations requires ā€˜each and everyā€™ device to be selected one at a time as the Condition. Thatā€™s just a very painful effort to deal with.

The only good reason Iā€™m thinking of doing this now, is that Automations have the Run Local ICON now. At least then Iā€™ll see in the SmartThings app whatā€™s running local instead having to look at the Smart Lighting Routines in the IDE to see if they are running local.

As for Automation device mirroring, Iā€™m thinking that If device is On/Off Then set other device On/Off. Wouldnā€™t that work?

The On/Off is a stateless toggle - so itā€™s possible they get out of sync. To do ā€˜mirrorā€™ (take what I have here and send it there) youā€™d need two distinct on and off automations.

I would also accept it lighting groups to worked like actual virtual devices as far as automations are concerned but thatā€™s another discussion.

Well, while watching some outstanding sporting events today, I created Automations to replace most of my Smart Lighting Routines one by one. In some cases I was able to combine a few Smart Lighting Routines into one Automation, and in others it took two Automations to replace them. So Iā€™d say it was an even split.

However, one thing that I couldnā€™t move over was Button Pushes since they run ā€˜localā€™ in Smart Lighting (verified by disconnecting the Hub from Ethernet), but when I tried using a Button Press as an Automation Condition, it didnā€™t run local (tested the same way by disconnecting the Hub Ethernet). And neither did the Button devices page configuration settings which just created an Automation too that didnā€™t run local.

One thing they need to enhance in Automation Actions is to include Sunrise and Sunset time logic with the ā€˜Auto Turn Offā€™ setting.

And, I could really use folders, containers, collections, groups, rooms, or something to sort all of my Automations (70+). But for now Iā€™m just using alpha-numeric name titles to deal with the long list of Automations now.