I think the answer is Yes with a caveat. If OP is using a standard Zigbee or Z-Wave switch, won't it turn off manually then have to have a rule that immediately turns it back on? Only if the switch is a scene controller can manual control be blocked and won't cause target light to flash. Or am I missing something?
It is a Z-Wave switch, I just want to make sure I NEVER go to bed, leave the house with this door open. I do have notifications set for this door. If I can get the Z-wave light switch working this would be best for me.
It should be possible. My caveat was going to be that the switch may need to support 'switched on/off [physical]'. Two Basic Rules for Q2. An RM rule for Q1:
Trigger - Switch turns off 'physical'. Conditional trigger 'door is open'
Actions - Turn switch on, wait for event 'door closes', turn off switch.
As is usual with these posts, there will be multiple ways of achieving the desired result.
Over the years I've realised that when the question is 'is there a way of doing this with Hubitat/Rule Machine', the answer is invariably 'yes'. I've yet to find something that's not possible with the right devices and some lateral thinking.
Some switches have “detached relay mode” a.k.a. “Smart bulb mode” which turns the switch paddle essentially into a remote. Then only the hub can turn the light on/off based on the paddle events (or ignore them).
For the benefit of those new to this kind of feature: physical actuation of the switch is disabled, but typically not the paddle actions, in the sense that those paddle actions are still forwarded to the controller as button events even when the switch is not actuated.
Will have to be multiple rules one to turn on and another to prevent turning off while open. I have something similar with my attic lights where they turn on when the stairs are pulled down but if they are up/closed this rule prevents the lights from being turned on:
Turning on the light when the contact opens, is likely the most basic rule possible in Hubitat. See sample below.
I cannot think of a way to keep the light on if someone turns it off, either by physically operating the switch, or by commanding it off in Hubitat. But the following rule will turn it on again immediately. Certainly it will be off for such a brief time that you won't fall asleep during that time period.
Be aware that some older Zwave switches do not update the Hub when they are turned off physically. If you have these older switches you will need to also install a polling or refreshing app to keep the Hub aware of these physical changes.
You replied to me, but since you mentioned @ritchierich, I assume your comments were directed to the rule he offered.
@ritchierich did not create that rule specifically to solve your problem. He stated that he had something similar that was intended to keep his lights off. So no surprise that's what it did when you copied it verbatim.
All you have to do is substitute his components with your own.
Replace "Attic Stairs Contact" with "Large Slider Door Contact"
Replace Attic Lights" with "Dining Room"
In other words...
Replace Required Expression = "Attic Stairs Contact Is Closed" with "Large Slider Door Contact is Open"
Replace trigger ="Attic Lights Turn On" with "Dining Turns Off"
Replace action="Off:Attic Lights" with "On:Dining Room"
In both rules you said
"If the dining room turns on, then turn it on again"
Your first rule will only turn on the light if the door is open, and the second rule will only turn on the light if the door is closed.
So the bottom line is if anyone turns on the light, whether the door is opened or closed, Hubitat will send the "on" command again, making doubly sure the light is on
But didn't you only want the light turned back on whenever it was turned off, and to only do that when the door was left open? That is the scenario that I created my example rule for.
Yes, sir you are correct. However I thought that was what you where telling me to do in your last post.
Thank you for all your time. I will figure it out.
You are right when the Door is OPEN light is to stay ON.
FYI I did not give all my screenshots I tried all different ways and I could still turn the light OFF.
With ritchierichRegular
it keeps the lights OFF. When I do just as he has it I can not turn the lights ON. Just thought I could reverse things and have it do what I want.