Edit: I just did, and it has a ton of options, but unfortunately doesn’t look like it can do what I am trying to achieve.
My main use case is auto-off (step 2). The auto-on use case (step 3) is only because the motion sensor sometimes isn’t sensitive enough and fails to detect motion erroneously. Waving arms at the sensor when finding oneself accidentally in darkness can then solve the problem. This is how all California title 24 light switches operate (mandatory for bathrooms and kitchen in new construction) - they combine a motion sensor and a wall switch. I have about 97 of them around my house. All of them are dumb models. I’m trying to replicate the behavior, but with (semi-) smart switches.
You can use Shelly buttons to do what you want possibly. Also you can stay with the old switches and even make them smart by setting them to edge and putting a Shelly relay behind them in the switch boxes…
Thanks. Shelly is not really an option for those 4 X10 switches, also. They are deep and barely fit in the electrical boxes - probably no place to put a Shelly behind each one and especially not the extra wiring for them.
I don’t understand why any new hardware would be required in this case. The motion sensor detects motion/no motion. The switch can be turned on or off. It seems to me to be purely a software problem, not hardware. Are the automations in HA not powerful enough to do what I need ? It seems to me all that’s missing is recording the time of the automation’s last shut-off into a variable, and adding some if statement in the automation’s branch when motion is detected. I guess those things are not possible to implement in HA ?
I don’t have a complete solution, but I’d look into examining the state object of the automation itself to look for a “last triggered time”. It’s exposed in the UI, so it’s probably in the state somewhere.
I’m working on setting up something similar for my bathroom, with the additional complication that I’ve got three different switches, two of which are dimmers. I want to first dim the lights as a “warning” before shutting them off, but allow restoring them to their original level if there’s motion during the timeout period.
Sure, use HA to talk to the motion sensors and switches directly then, no issue. What I was trying to say, was you wouldn’t even need to replace any switches - not even dumb ones - if you added in a relay. This all is easily done in HA, it is so flexible you can have numerous devices all from different manufacturers, interact with each other. No other system that I know of offers that much flexibility with so very many manufacturers either. So the answer is, yes HA can do everything you need
Thanks. Please let me know what you figure out for your bathroom. I looked for “last triggered time” on google and found this :
It doesn’t have a specific trigger associated with it in that example, just an automation, no trigger id. So, it may take 2 automations for one switch if I understand correctly. One for the simple OFF part like I had at the beginning of this thread, and another for the ON part that would track the last time the OFF automation was executed and have a motion ON trigger and condition (<30s) to turn the light back on.
This is less than ideal since the switch and motion sensor would both have to be specified twice, in two separate automations. Or perhaps the trigger ID can be used here too with “last_triggered” attribute ?
Yes, I understand how Shelly work - they work with any switches. They require space in the electrical boxes, though. And I pay someone to install switches, also, so this is not the most attractive option.
So my question was really, can I use HA with my existing Z-Wave motion sensor with X10 switches to create the equivalent of a CA Title 24 vacancy sensor, ie. without changing the hardware ? And that to me seems like a software question, which is why I’m positing here. Perhaps there is indeed a way to create that automation, I just haven’t figured out what it is.
Sorry I haven’t been any more help here. A little busy / distracted at the moment. If I get time I’ll work on the above automation for you, but the answer is yes, you can do it.
It’s been a couple months, and I’m still no closer to having this solved. Do the HA wizards have any idea to accomplish this ? I am adding a bunch of Z-wave switches (smart ones, that can report their status) but would really like to have the vacancy sensor behavior with them.