Use zone activity in flow as "and" condition

I’m looking to create a flow that does the following:

  • When it’s 11:00 AM
  • AND there’s nobody at home
  • AND there hasn’t been any activity for at least two hours
  • THEN start the vacuum

The second AND condition is the issue here. There’s a flow WHEN condition that says “when a zone is inactive for …” but that’s only available as a trigger. I don’t want that, I need the time to be the trigger. But then it becomes difficult to check how long a zone has been inactive for. I checked whether some tag exists for that, but that doesn’t seem to be the case. Has anyone implemented something similar or know of a different route to get me to where I want to be?
Using Homey Pro 2023 with advanced flow.

BTW for those who might wonder why I want to check for inactivity when there’s no one home; not everyone in our household is monitored by Homey so the “there’s nobody at home” condition is wrong 1 out of 10 times. I figure this combination of conditions should give me 99.9% accuracy :slight_smile:

You could do something like this, I use a Chronograph timer, which can be (re)started and paused:

I wouldn’t use “The time is 11:00”, you often like the vac to run whenever the house is empty for 2 hours straight, which is not bound to a point in time.
But, of course you can limit the allowed vacuum starting time, like, between 8AM and 8PM

Nice solution! I can definitely use that, so thanks.

I do like the predictability of the vacuum running at a specific time instead of a dynamic time bound to when the zone has been inactive for a longer period of time, but I guess I can use a flag linked to your chonograph set-up to get that going.

In your set-up, doesn’t the vacuum run twice if you would be at home for lunch for instance? I also believe there might be a slight bug in it; the second condition now triggers when zone ‘boven’ became active (should be inactive I suspect) :wink:

Thanks for getting me in the right direction!

Still need to test it, but this seems about right:

Thanks!

Yes for time triggered action, you can use the AND cards I showed in the lowest flow, to check occupancy and then let it start the 2hr timer.

In this example there’s indees no run-check. You can create and use a Y/N variable called , like, “VacRunComplete” for that.

To avoid false triggers, like:
vac started, but had to stop while someone enters the house after 15 minutes,
I check the vac’s battery level, instead of “vac started” or “vac docked” events:
After a full run, it’s around 80%;
So, I set the variable “VacRunComplete” to Yes when the vac battery dropped below 85%

At midnight, or early morning, you can set the “VacRunComplete” variable back to No.

_

Sharp, it should of course be ‘inactive’
I adjusted the screeny.

1 Like

Looks good.
You only can miss daily runs, when there wasn’t a 2 hour straight inactivity at 11AM.
But I guess in normal situations there’s no activity to be expected after 9AM.

Yeah that’s not an issue here. On the days we’re not at home there shouldn’t be any inactivity within that timeframe. Thanks again!

1 Like

@jsiegmund, today a new App was released which solves your problem by checking the zone activity in the And… section:

1 Like

@DirkG That’s awesome! I’m going to try that out! What would I use as the trigger in that case? Would be nice when ‘zone was inactive for x minutes’ would be the trigger itself.

Why would you then again test if the “zone is inactive for x minutes”? Maybe you can share your flow?

Never mind, I wasn’t thinking clear I guess. I simplified the entire thing dramatically by doing this. I think this should suffice.

1 Like

If you want to realize the requirement from your first post exactly, then the presence check is missing:

Agreed :slight_smile: I left that out since I don’t expect the zone to have two hours of inactivity when someone’s at home. And if so, the chance of them entering the zone while the vacuum is working isn’t that big and not that big of a deal. Next to that, presence detection doesn’t seem to work that great either.

Long story short: this should do it for now :slight_smile: