Most efficient way to 'flow' this humidity change

The Idea:
IF: humidity changes
AND: humidity changed by more then 5% in the last 30 seconds
THEN: turn on ventilation at max

Why this flow? If I check humidity above a certain level, for example 75%, then I am to late. Then possibly the shower is running already a long time. I want to achieve two things:

  • Turn on the ventilation as soon as possible if the shower is on
  • Try to use as less resources for this flow as possible.

I can come up with many different solutions, like having variables every 30 seconds and check the difference between them every 5 seconds. But I think this gives a lot of resources for these actions. Are there more clever ways to turn this into a flow?

Something like this
First create a numeric variable; I called it ‘LastHumidityValue’. Enter 50 as value.

Needs some finetuning, but you get the idea



I solved this in a quite similar way.
This flows compares the “old” and the “new” value of humidity.
When the difference is more than 6%, my ventilation turns on.
This is controlled in another flow.