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âŚ
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.
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 . I must add another factor then: boiler is on as well
Maybe you wanted to add 1 on your shower-pipe , 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