Homey Community Forum

How to check for no motion for x-amount of time

Greetings,

I have several motion sensors an I was wondering is there is a quick way to check if all motion sensor detected no motion for x-amount of time.

The option which I know how to do is to use a flow with a countdown timer.
A better solution would be to store the time in a variable and check this variable against the current time.

Which approach would you recommend?

A question upfront, what is your intention with this knowledge? That way we can think along with you.

I use group app an have group af all motion sensors in it. There you can see when was the last movement on any sensor within the group. But you don’t know on which one :frowning:
Second option is to use Heimdall security app and you can see all sensors in app setting with last change of state.

I do the latter, storing the timenow to a variable. This frees the resources for counting down since I check against this last detected movement for setting my SMARTPRESENCE and also predicting if someone is asleep or watching TV etc…

I’d like to use it to determine is someone is home or if everyone is are sleeping.

I would also like to use it as a generic condition where I can check is there was no movement on a sensor for x amount if time via something like a logic card instead of having to configure a timer for each x.

I would go for the variable. But it will take quite some flows to do this. The way i do this at this moment is making 1 timer for one hour. In several flows I ‘also’ activate this timer. When that timer is empty it means that there has been no movement for some time, and ofcourse I use that in the THEN part. Ofcourse i trigger the timer in those flows with the motion sensor. But also the flows when the tv or radio turns on. At about everything for which a human action is needed I activate the timer. I also have a vacation timer which is 24 hours, which activates my vacation mode.

1 Like