I am hoping I might be able to get some help. I have a contact sensor on the bathroom door, as well as a motion sensor and an actual switch(contact sensor). I want to have the bathroom lights turn on when any of the 3 are closed/active. If just the motion is used to turn the lights on, then I want a 5 minute timer to start to turn the lights off. But when the door is closed or the switch is closed, I want the timer to be paused/cancelled and the lights to remain on. After the door is opened, I would like the timer to resume but if someone goes back into the bathroom I would like the lights to remain on until there is no motion/activity. I also like the idea of the switch completely canceling all and not turning the lights off until the switch is off. I am in the process of switching from core to web core. Previously, everything worked great but the light would turn off if say someone walked into the bathroom, but didn’t close the door until a few minutes after the light turned on.
Bathroom Lights with Motion and Contact Sensors
That would be great. I guess I still don’t understand the conditions and flow of the piston. I was never good at coding and this reminds me of it.
Let me see if i can throw together an example. Your pistons (bathroom day and bathroom night) don’t have a trigger. Get rid of “is” and choose “changes to” in the first part.
All of these pistons should work as written if you get rid of “is” and use “changes to” instead. “Is” is for status of supplemental items, but you need an action to make them fire. If you look the options are sorted according to action and other.
Edited by @c1arkbar
This information is not correct. The lack of a trigger and use of only conditions will cause the conditions to act like triggers.
You talk about an actual switch. You should use switch changes to on for that one. Not contact sensor.
I also notice that you’re using time as reference. Which isn’t wrong, but if you set up location modes, then you could control if you went to bed early or got up early, etc. Just by the mode that your house was in. This is how I have my pistons set up. then I have a complex piston that controls my location modes. Keeps things a bit more true to form to make the house interact with you instead of waiting for a certain time so your bathroom will let you take a shower.
I use a contact sensor with a switch wired to it as a physical switch to turn the lights on and off. This makes turning the light on easier than trying to navigate the dark bathroom where the pull chain switches are located on the light fixtures.
The lights are 2 Phillips hue bulbs and there are pull chain switches on the light fixtures themselves. I do not use modes as of right now. There are 4 people in my home and we all go to bed at different times.
I edited a post above where some bad info was passed. A piston with only a condition of “is” will still execute the piston when the door opens.
I don’t agree. Maybe in theory. As Adrian and others have explained in other forums I don’t believe that “is” can be reliable. Also, in my experience using “is” caused problems when executing a simple piston.
I don’t want to get into to much of a debate about it but I’m wondering why you feel this to be so.
I base a lot of my simple pistons for lights and motion around the ‘is’ statement and they work 100% of the time.
Just wondering why that’s all.
Here is the sort of thing I mean.
“is” is listed under conditions not triggers. Original intent to refer to other contributing conditions. Because of this, I do not believe that “is” can be reliable. Especially if they take this piston and make it more complex. Since I believe that the original poster has an intent to create a complex piston as it would make sense, the piston will be flawed because there will be too much going on. And therefore I don’t feel that editing my post was justified as it was not “bad” information. I’ve built simple pistons with “is” and found that using “is” had become a crapshoot. I dumped using “is” as a main trigger after my second failed piston. Since everyone builds their pistons differently and there is not really a “wrong” way, per se. I thought that move was a bit bold on your part. (c1arkbar) Besides I kind’ve feel that if this forum is going to end up edited for information that you feel is “bad”, maybe I don’t want to contribute anymore. You definitely could have handled it better. Not to create a debate or anything.
OK. Sorry if I’ve touched a nerve. That was not my intention. As for your post being edited, I hadn’t noticed that part.
My query was a genuine one in that if the ‘is’ can be unreliable, I just wanted to know why so that I don’t come across an issue that causes my set up to become unreliable.
Once again, accept my apology as no offence was meant.