Send email if variable is < x but only once

Scenario:
Water tank → variable from 0 to 100%
I want to get an email when variable is less than 10, but only once.
Currently my flow is simply:
If Variable has changes
and Variable is less than 10
THEN send email

this triggers a lot of emails, as every change will fire.

i’m looking for an elegant way to only get one email until level is above 10 again!

Thanks

Why don’t you add another boolean variable “mailsent” ?

thats the easiest way, but i was curious, if there is any other way without additional status variables…
thanks

Maybe this one:
If Variable has changes
And Variable is exactly 10 (or maybe 9) %
Then…

Another one:
If Variable has changes
And Variable is < 10 %
And Variable is > 8 %
Then…

Of course, I don’t know if such a situation can happen, or if the variable is only updated for example every x minutes and then a jump from 11 to 8 % is theoretically possible. In this case no email will be sent.
Furthermore I don’t know how exactly the percents are reported, with or without decimals. For example, if the following values are reported: 9.9 / 9.8 / 9.7 and so on, then several emails would also be sent.

Another one:
Deactivate the flow with a second flow, if the variable has changed < 10 %. And activate the flow again if the variable has changed to > 10 %.

why the easy way indeed if there is more complicated ? :rofl:

1 Like

We humans have our quirks I guess :stuck_out_tongue_winking_eye::wink:

thats how i solved it …

The 3rd line seems superfluous. You could toggle the boolean and send the mail in the same breath.Couldn;t you ?

Hi @ricercar ,
You could if you check the status of the boolean variable, but for readability it seems to me as good as it is - with the third line.