Test if a value is below a limit for a while

Is a good way to test this to use a “When X becomes less than Y” → “delay 5 minutes” → “and X is less than Y” → action, or will this become a mess due to the somewhat long delay for some reason?

In those 5 minutes X can become greater than Y.

I suggest 3 simple flows,
Flow 1: IF value x less than y THEN start timer of 5 minutes
Flow 2: IF value x changed AND x bigger or equal to y THEN reset timer
Flow 3: IF timer ends THEN “do your thing”

Edit: timer from f.i. chronograph app

2 Likes

You have to explain “start timer” because that’s not a built-in feature.

How about:

Device Capabilities app

4 Likes

I think he is referring to countdown.

1 Like

I’m aware, that is why I had a test after the period as well. I wasn’t checking during the period though, but I wanted to keep this simple task simple, so I thought the limitation would be worth it.
I suspected though that I might risk triggering a lot of running flows with delays that then would execute a lot of chaotic actions that seem unrelated to the current state if the value would oscillate around the limit. I suppose this is not a good solution, which is why I asked in this forum :slight_smile:

This seems like a much better solution than mine, thanks. It is a bit complicated though if you want several of those kinds of actions.

This is fantastic, I thought this would be something others must’ve wanted, and it turns out it was. I’ll try this out for sure!

3 Likes