Let me explain: I have this flow that, using a presence sensor in the kitchen, turns off the lights if no one’s around after X seconds, and the TV does the same after the time set in the flow. Everything works perfectly, but I’ve spotted a problem—if you step out for a moment and come back after the timer has already expired, the lights go off and then the TV does too, and you have to switch the lights back on manually and turn the TV on again if you were watching it.
I guess it has to be handled with timers, right? Any examples?
This is my preferred way to not being left in the dark.
It was designed for PIR’s (motion sensors), but it works just as grear with presence sensors.
Of course you’re free to swap the “zone” cards with “sensor” cards, but I prefer zone cards for the sake of of flexibility.
(I don’t use the “zone has been inactive for x minutes” card, because it turned out to be unreliable @ Pro 2019.
Chronograph timers have proven to be 100% reliable).
I solved this problem using the Zone Activity App. It allows you to create virtual motion triggers which you can turn on and off the alarm, but also turn on and off the device itself. This gives you complete freedom to disable/enable presence based flows.
See the screenshots on how I incorporated this into my flows for lighting. You can see that the actual motion sensor only stays active for 1 second. It triggers to flow to trigger the virtual motion alarm for a specific amount of time. Every time motion is detected, it triggers the flow again without deactivating the entire zone. This also solves the problem that the motion alarm is triggered with old luminance values in moest motion sensors. If the Virtual Motion Sensor is turned off, the entire flow turns to manual.
Fair enough. The setup I showed is actually more of a framework that gives me complete control over when a room is actually active or not and when the entire flow is enabled or not. In my case the virtual motion triggers can be controlled by motion sensors, presence sensors or even other smart devices.
When you have a very accurate mmWave presence sensors and you don’t need to disable/enable the flow, then you might need it.
however, I also don’t think you need the setup suggested by Peter. I think that what you want can be accomplished with the new “When the zone has been inactive for [minutes] Minutes” card.
What you need is called a Debounce pattern. It’s not just a simple timer, or delay, but a timer that can be reset every time new presence has been detected. This new When card will do all of that for you.