Motion Lighting Configuration

Thanks for the update. i await a fix. It is reassuring to know I am not losing my mind.

One thought on the implementation though. In my case I would not want to override the turn off delay of the action, merely prevent the level from bouncing back to the mode defined level. This really is behavioral, if the light comes on (ie. closet lights) i override it to be able to see color better (those days when the wife doesn’t lay out my clothes), i will continue with my morning and eventually walk out not turning off the light due to being in the habit that it is motion controlled. In other use cases I can see wanting to override both the turn off and the setting of levels.

It would be a UI and usability mess to implement two different things to be caused by the same action. It should be one or the other. My thought was that since you’ve gone to the bother of messing with the dimmer in order to take control from the automation, you have to also bother with it to give control back to the automation.

Bruce, I don’t completely agree. As for the UI aspect, it could be an option overide level vs overide automation.

In an area of the home used by multiple users the behavior being trained is this room is automatically going to turn off. If one user changes brightness, other occupants may not realize.

If we are attempting to fully automate a home, it is necessary to be able to augment the automation without completely disabling it.

I understand. I will look at how this could work.

Updated: This feature will be in the next release.


great news!

This feature is now available in the latest release:

I saw that in the release notes!!! Great news. I haven’t played around with it yet, but will soon.

I have a related, but maybe not exact use case.

I have used and loved RM in SmartThings, but saw that Motion Lighting had both a Switch to Disable On and Switch to Disable Off feature.

Previously, in RM, I would create a virtual switch and then have that rule not fire when the switch was turned on.

I’m attempting to get that same result in Motion Lighting by specifying the same virtual switch in the settings for ‘Switch to Disable On’ and ‘Switch to Disable Off’.

I note that it doesn’t ask what the state of the switch is in the config options, so maybe I’m misinterpreting what this is for.

Basically, I want the lights I’m controlling to remain in whatever state they are (on or off) ignoring motion sensor activation when this virtual switch is on.

It seems to work for not turning lights on when the virtual switch is on, but, when I turn the virtual switch off, and the ‘Time to Delay before turning off’ time elapses (10 minutes in my case), the lights are remaining on.

If I have to do a Rule for this, it won’t be the end of the world, but I was just wondering if Motion Lighting could handle this case?

Am I missing something obvious? Thanks for the help/guidance. :slight_smile:

Take a read of should help.

1 Like

Started playing with the level override.

So, my configuration is as follows:

What I seem to be missing is I still want to have a means via button or switch disable the automation all together. I have a pico that I use to turn on a virtual switch for "sleeping" to disable a number of automations. Is this possible? Maybe I am missing something.

The light level override works great!

I haven’t tried this myself but why not use the same switch in “switch to disable on” also be used in the last group of options “switch to disable off”. That switch would essentially disable the whole automation…I think :crossed_fingers:

I can confirm that using the same virtual switch for both override on and override off works… the only wrinkle is that it appears that the internal ‘rule’ doesn’t get re-evaluated when the virtual switch is turned off.

In other words, if I have the lights go on, then put on the override virtual switch, and wait past the ‘delay to turn off’, it works great - lights stay on. But, if you then turn off the virtual switch, the rule isn’t re-evaluated - the lights will stay on until another cycle of motion/no motion.

This is a minor wrinkle, and usually easily avoided if the sensor is going to pickup movement relatively quickly. Once it does, the rule is re-evaluated and all works normally.

@bravenel are there any plans to change things so that the current rule / scheduled action is re-evaluated? I want to use a virtual switch set by multiple possible channels (ie. a button, action on a switch, alexa, etc.) all to turn on / off a virtual switch. The virtual switch would be the switch for the enable on and disable off. But if the same virtual switch is used, then the light could already be on, turned off by the existing schedule then not turned on because enable on is false.

Motion Lighting does not have rules that are evaluated. It is entirely event driven. So the simple answer to your question is, no, there are no such plans.

I don’t fully understand what you’re trying to do. Using the same switch to enable on and disable off doesn’t sound logical… ??

Thanks Bruce - this does help answer a question and strange behavior I was seeing in Motion Lighting.

Back in the early days of RM, when I submitted a patch for you to consider for rule override, the general pattern was that a switch (virtual or otherwise) was evaluated to see if it was turned on. If it was on, then execution of the rule was effectively suspended.

So, if you didn’t want the rule to fire turning on lights in a kids room after bedtime (but with the house in Home mode), you turned on the virtual switch. Disabling off is a similar use case - the lights came on with the automation, but, turning on the virtual switch would prevent execution of the ‘turn off after x minutes of inactivity.’

Based on your earlier example in Motion Lighting, I was under the assumption that using the same virtual switch for ‘disable on’ and ‘disable off’ was operating in the way I just described.

If that’s not the case, I can easily convert my Motion Lighting to RM rules. If you could clarify, that would be great.


You should not need to know how the implementation handles this internally. RM did things in one way because it had a more general problem to solve, namely the evaluation at a point in time of a bunch of conditions. Motion Lighting doesn’t have that problem to solve, so it goes about it differently. Whereas RM was implemented such that it found out the current state of a device at the time of evaluation, Motion Lighting is implemented such that it maintains in its internal state the implication of the state of the device. Motion Lighting has subscribed to these override devices, and uses their events to manage its internal state. RM did not maintain internal state about devices. The net effect of either approach is the same (or should be).

If you turn on the disable-off switch at any time before the timer runs out on motion-inactive, the lights will not turn off. Motion Lighting should function exactly the same way the corresponding rules would function. If it doesn’t work as expected, there could conceivably be a bug somewhere, although I am not aware of any at the moment.

Thanks - so, the only thing you previous message confused me on slightly was using the same virtual switch for both ‘disable-on’ and ‘disable-off’. If Motion lighting subscribes to the ‘on’ state for both of those conditions, I think what I’ve built will work fine.


Yes, you are right, that should work fine. I use that in one of my Motion Lighting rules. I probably misspoke before…

1 Like

There needs to be an app that can do this:

  1. Motion triggers light
  2. Secondary Switch can be turned on/off based on an extra condition after a specified amount of time. (Door closed after motion event)
  3. Motion off disabled if motion becomes active after door is closed
  4. Motion Off enabled after door is opened
  5. Switches can be turned off at different times after motion stops

This would be ideal for a Bathroom that has a light and a fan.

Switch 1
Switch 2

Why not just write a Bathroom App? I’ve seen you mention this use-case multiple times now. It seems to be a fairly specialized use case for a bathroom. You could write an App that handles this and then share it with the community.