If and wait command?

Hello ,
I just started using node-red and I don't know js. I would be glad if you help.
What I want to do is to send an e-mail if an incoming temperature information is above a certain value, but then wait 30 minutes to send second e-mail again. In short, I would like to inform by e-mail every half hour if still temperature is over than compared value.
Thanks in advance
Regards

Can you show what you've got so far. I assume you've got some node checking the temperature on a regular basis, or perhaps a node that gets triggered based on the temperature (is this all from Home Assistant?). Then after some logic, you're sending an email. Assuming another high temp will trigger the flow again, it sounds like you just need to introduce a delay node, configured to "Rate Limit" to 1 message per 30 minutes (with the option set to drop intermediate messages).

Hi & welcome to the forum.

Before trying to solve something you dont understand, I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

Once watching those, your problem can be solved with built in nodes. e.g. switch (for checking temprature) and trigger node (for re-sending) etc - but do yourself a favour, watch the vids :slight_smile:

Thank you . I had found delay but didn't see the rate limit option. It works perfectly with delay.

Thanks for these links. I had watched some of them but i have to see all of them. Thanks again

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.