When {any} switch is on for 60 minutes, turn it off

I'm setting up Motion Lighting, and adding a virtual switch for each room to function as a lock to keep it from turning on or off. I'd like to reset those switches after ~60-90 minutes so that the lights don't stay on forever, but am trying to avoid creating another 8 RM entries, one for each room.

I see that I can select a number of switches, and let it use "any" of them to trigger the rule, but did not see a way to select the switch to act on based on which switch triggered the rule, like, Living Room Lock has been on for an hour, so turn off Living Room Lock.

Is there any way to do this?

Use rule machine :slight_smile:

Yes, but i was hoping there'd be an easier way to act on the device that happened, from a list of devices that can activate the rule. Seems that it can only be a 1:1 mapping of rule to switch, necessitating a separate rule machine app for each switch. Just curious if there was some functionality that I was missing there!


There might be another/more consolidated way to do it, but I would just make a rule per switch... Not that big of a deal?

Time it took to create and check back on this thread the rules would have been made and he could have moved on with his life lol.

I understand though that it would be much easier to do it with 1 rule but think of it this way...you'll only be doing this process once!

What I did was create rules in rule machine for each room as well but I did it based on mode. So for example if there's no motion and the lights are on in the bathroom when the mode is night, then it turns off the lights after 1 minute. The same rule turns off the lights after 2 minutes in day mode and 3 minutes in evening mode.

I did just set up Motion Lighting with modes for each of the rooms, with various timeouts for normal usage (i.e. 5 minutes kitchen timeout during the day, 1 minute at night, etc.), but this is intended to reset my "lock" switches that will mostly be used by my wife to "stop these crazy lights from going on and off" when she's trying to work, or nap on the couch. Basically, I want to be able to lock the rooms by turning on a "{Room Name} Lock" switch via alexa, which will stop turning on and off, but I don't want it disabled for the rest of the day, so I want to have these switches turn themselves back off after 60-90 minutes (or more).

I feel like I already have a lot of RM rules, and am looking for any ways to combine or otherwise cut some of them down:

[quote="toyanucci, post:5, topic:13882, full:true"]I understand though that it would be much easier to do it with 1 rule but think of it this way...you'll only be doing this process once!
[/quote]

I can appreciate just getting it done, but also enjoy finding more complete methods, which could cut down on work in the future.

Would @Cobra’s One to Many work for you ??

I use something similar for my ‘all speakers’ switch
I have a virtual switch controlled by alexa which uses my virtual switch timer driver set at 90 minutes
If this is turned off, it will turn itself back on again in 90 mins.
I then use ‘one to many’ with this virtual as a control switch and a number of other switches which enable/disable my speakers as my follow switches.

Andy

I am trying to create this rule and can not seem to figure out how to get these conditions in rule machine. Not sure if things have changed since this posting.

I have two zwave switches in the bathroom. If the Light or Fan is left on longer than 15 minutes. I want the switchs to turn off

IS this rule machine I should do this under ?

In rule machine

I do not know how your getting to this IF statements ?

Under conditional action

not sure what I am doing wrong, I do not have those options

You are still in the trigger section, you need to click done with trigger events.

Got there, I can just not figure out what is next, I can't get to the THEN statement

stuck here