Closet Light help please

Greetings all. I have smart bulbs in my closets with contact sensors on the doors and there are no manual switches. Using a Simple Automation rule works perfect for turning the lights on or off as the door is opened or closed. Exactly as desired. However, how can I add the option to turn the light off after several minutes when the door doesn't get closed. Not that anyone would ever leave the door open, but just in case.
(please note, I am a simple person, as noted by my use of the simple rule, which is awesome)
Thank you all.

I'm a simple person too. How about a motion sensor instead of the contact? SA has an option to turn it off after a time. I use that for a bedroom walk in closet. We never close that door. I put in a restriction that turns the automation off late at night if the cat should roam.

Try something like this. Not a simple rule but simple enough to make.Screen Shot 2021-02-03 at 9.38.29 AM

1 Like

Ahhhh yes, the cat. They too are a consideration. Thank you.

Do I find these options or settings using rule machine? I get lost in there quickly as I am still very much in learning mode.

I use an app called Auto_Off. You can load this app, set the time to turn off very easily.

There are two different versions by different authors available through Hubitat Package Manager. If you haven't tried HPM, it makes installation and updating of apps and drivers very easy. Or you can install Auto Off manually by importing the Github link.

3 Likes

Thank you. I've been told I have some OCD tendencies as well. I like the one app to address multiple devices. I recall how to open, select all, then copy the code. Remind me please where I then paste this code.
Thanks again as this offering from Mfornander looks like just what I need.

As I read more about this, I may go with the suggestion from davidcwright59. I understand the "All Off" code uses a single timer to control all devices on its list, which certainly has use. In my specific case, I think it best to have each closet individually controlled (timed) as we are on different schedules. All of these suggestions are very much appreciated.

Well, if you want to keep it simple, I think I might have a fix. I have a pantry with a contact sensor, but we're pretty good about keep the door closed. Just now I added a simple automation rule for the contact switch to turn OFF the light after one minute when it's opened (nothing in that rule for close.) Seems to work. I'm going to keep it, lol.

1 Like

Thanks velvetfoot. This too is awesome. I so appreciate the input and advice from this community.

Maybe that too will remind whoever is searching the pantry to hurry up and make a decision! ha ha ha

1 Like

Yeah, but a minute is a pretty long time to be searching for something-it's not that big a pantry.

On the other hand, I might get some feedback like, "well, I wanted to keep the light on, when going back and forth. No win, in all likelihood.

Maybe a longer duration would alleviate this.

Yes, Rule Machine. Just make a new rule. Just give it a try. Doesn't hurt to explore.

Thank you again. I worked on this when I got home. I changed yours just a bit. I removed the "Wait" command and added delay to the conditional "off". Tested and it seems to be working perfectly. You guys are great help!


Thank you

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.