Pardon if this is overly simple question (likely I'm complicating something simple). I am running a simple automation to turn off a light if there is no motion for 1 minute (I don't want to use motion to trigger on... just no-motion to trigger off). Simple Lighting allows this pretty easily and it works. The programmer background in me would really like to insert some sort of if-then check... as in only turn off the lights IF the lights are on... otherwise do nothing.
So, am I not considering something (performance or otherwise) with sending an OFF command to something that's already OFF? Or is the If-Then actually helpful. Or is that simply setting the value of a variable, and no harm done if you are just setting the value to its existing value (i.e. light.state is off and light.state = off;)
Side note: I looked at the Motion Lighting App and didn't find a way to create a rule for only turning something off (I had to trigger on in every scenario).
Rule Machine should handle what you are looking for. You can set just about anything to "trigger" something to run, and do so based upon if conditions you designate are present before running. here is an example. You can make these as simple or complex as you can create.
Thanks for the response! I figured as much... was hoping to take advantage of the simplicity of Simple Lighting App, and was curious if I was causing anything (poor performance long term? something I'm not thinking about?) by sending an OFF to something already OFF.
RM would certainly work, but I'm pretty sure you could also use Motion Lighting. "Lights to Turn On" is optional, and you could just add your light as an "additional light to turn off." (That being said, I'm not sure if anyone has ever actually tested the app in this configuration...) Simple Lighting could probably also work if this is all you want, since as noted above an "off" to something already off is generally harmless.
As with most things, you have a lot of options, so good luck whichever way you go!
Here is a simple rule pretty much doing as you are looking for. The rule is triggered by motion but only runs the actions if the light is on and no motion present. It also has a 2 minute delay which is cancelled if motion becomes present again within the 2 mintues.
I do, but only for the reason of all my logic is in one place. Plus, a lot of my rules pause other rules and AFAIK, you can't pause SL or ML apps (at least not that I have ever seen). A lot of my lighting rules run off contact sensors, motion sensors, virtual switches, and physical remotes. So, for instance, if the bathroom door shuts, I pause my bathroom motion rules until the door opens again. I know this can be done via ML, BUT, ML lacks the ability to have different lights come on in different modes.
This is one of my bathroom motion rules. I have no clue how I'd express this in a single ML app. I'm always open to suggestions, of course.
That seems like more complicated logic than what the OP described .
I know motion lighting and simple lighting automations can be paused from the settings pages, Iām not sure about whether RM can pause them though.
For the OPās purposes, I think this is the key question. And I believe the answer is no. @bravenel could probably confirm, and explain much better than I can why.
I remember both Mike and Bruce saying in the past that HE handles redundant commands already in the back end. So, if a device is off and you send an off, it just doesn't resend that command. Same thing for any device that is in the same state as it already is when a command comes through. But, that was about a year ago?
This can be done with a combination of Scenes and Motion Lighting. Motion Lighting has Scene Per Mode. So you could define a Scene for each mode, with any combination of lights/levels/color-temperatures/colors. This is one way to do this that is fairly simple to setup, and easy to change (by adjusting each Scene). Then you can get the overall motion-activated lighting action of Motion Lighting, with its various options, with total flexibility as to what is turned on in each mode.
I should add that I personally dislike complex Rules. They quickly get confusing. I'm always oriented towards a less-is-more approach.
Nope this is what I do with it so definitely possible. Just use per mode settings. I have X lights to turn on at X level in X to Y modes and Y light to only come on in Y mode.
If you need completely different set ups per fitting and timers then your need to split them to two ML apps.