Shower Timer (in Node-Red)

Hi, since I am not having success in the automation section of home assistant I am trying now in node-red and I hope for some help here.

My goal:
to flash the light after 5 minutes of water usage.

This is a typical shower session:

I have 3 entities:
current water consumption: sensor.water_consumptie_nu (above diagram)
current bathroom humidity: sensor.esp32_duco_01_sensor_1_humidity
current light status: switch.relay_1_relay

So only when the light is on and if during the 5 minutes the humidity is spiking (75%) I want the light to flash after 5 minutes of showering.

I came up with this, 2 options and I tried a join node, trigger node, etc. But possibly all wrong because I am just facing the fact I am not sure how to achieve the logic.

The main issue I think I have is to “see” a total of 5 minutes of water usage in a larger window (lets say 7 minutes). And if that happens and the light is on and the humidity raise above 75% during that time I want to flash the light…

Any help or suggestion welcome…

The Events: State node has a built-in test for values held for a specific length of time. I use it to monitor power consumption rate of a washing machine but your shower problem is very similar. E.g it can trigger only when humidity has been > 75% for 5 mins.

Having thought a bit more.

And the only thing I mis is a “counter” that counts water usage to a total of 5 minutes in an ongoing way. So that if the light is on ánd humidity rised up to >75% it triggers.

The thing is, how do I get sensor/counter that count those 5 minutes.

Only drawback is that if the wasching machine is on also water is drawn :ok_man:. I must add another factor then: boiler is on as well

1 Like

For inspiration

Thanks, but these topics have nothing to do with my question. I do have a watermeter already…

Maybe you wanted to add 1 on your shower-pipe :wink: , if you want to have a “perfect” shower-time result, not that i know why it’s so important for you whether you have “closed” the tap, while shampooing, i mean it’s not the amount of water spend you seems to be after ( it’s only for how long time water “some unspecified amount” have run through the pipe ) … or do you have some specific requirements for way you want to “count” time … if you beside telling you want a “flashing light” ( as an action ), maybe you get more “tips” if you tried to explain why you want to only measure the time water is running through your shower-pipe
EDIT: Have you checked your water-meter entity in dev-tools ?, to see which attributed it might have, and whether its only showing current-value, or in fact “sum-up” value, for hour/day/total, anyhow if you thinking about an template-sensor, you still need some kind of trigger to start “counting/sum-up”… ok, if the “light is on” , but no(someone could just turn on the light for other reasons) , light is on, and humid raises to 75%, No, because most likely it requires that the hotwater have been running for awhile.

Ok, so if your hotwater-meter indicates you r takin a shower, then start your templated-counter, when the hotwater-meter then have “metered” (running hotwater) for 5min, turn it of, or flash your light

5 min of hot water per shower session. With or without pause. What’s so special about that?

I don’t need a shower pipe water measure since my water meter perfectly gives me the info.