Need help with humidity notifications

I thought this should be easy, however, I do not arrive neither using rule machine nor the notification app.

What I want: A simple notification if humidity – from humidity sensor - in the bathroom is above a certain level (let’s say 60), for more than 30 minutes AND the temperature – from temperature sensor - is above X (let’s say 20°C) AND the window is closed - using window sensor. In addition, I only want this notification once per hour, and only as long as the humidity level is above 60.

I tried with rules machine where I manage to implement the delay and the conditions, however, I seem to get a notification every time the sensor sends a humidity level >60 to hubitat. In the notification app the delay seems to be missing for humidity, so I can only get notified immediately.

Can someone please help me build such a rule? Thanks a ton in advance!

Can we see what you have so far?

I actually deleted the rule as it was pretty annoying to get a notification every minute. Just created it as far as I came.

For some reason I get an error message stating that I cannot embed media into my reply not a link to my OneDrive :frowning: Do you have any idea how I can show you what I have, though?

Nonetheless, I believe my questions can be seen quite generic: How to implement a delay and make sure a certain action is triggered in a certain interval as a certain (set of) condition is met?

Thanks a lot in advance for any support you can provide

I would some sort of local variable to identify when the rule is running to block repeat notifications. Then once the conditions don't match it turns off the variable.
Sounds like your problem is ever humidity report triggers the rule completely every time,

If you want to use Rule Machine and want repeated notifications, I'd start by looking at the examples in this thread to see if any are helpful for your case:

If you don't want repeats, you can ignore most of the complexity in those examples, and I think the suggestion above (local variable, private boolean, etc.) would be one way to handle what you want.

In other cases, you might be able to use the built-in Notifications app, but that can really only handle one device (one attribute, really), so you'll probably need a rule to get what you want.

I have this on a Zooz plug that I have a tea maker plugged into on one outlet. It alerts me after the power drops for 15 min (to allow it to quit dripping) and then every 10 minutes after that. The "Tea Ready" is a virtual switch I have that is turned off verbally via Alexa when say "I have my tea".

Also the 30 second up delay on setting the boolean true is in case I turn on the tea maker by accident. It gives me time to unplug it.

Thanks a lot for your guidance!!!!!

For the moment I went through the link provided by bertabcd1234 and created the following

I'll check tomorrow morning if it is working as planned and will change the notification device to the one of my wife afterwards.

I really like what you have programmed tivomaniac, however for the moment it is a bit too complex for me, but I will definitely experiment with it at a later stage to learn more about the possibilities of rule machine.

I'm going to guess that isn't going to do what you want. Since the trigger is the humidity sensor any time it changes it's going to run the actions if over 60. I'm assuming you don't want it to be restarting at 61, 62, 63? I ended up doing something similar for my bathroom humidity to turn on and off the exhaust fan and I used three different rules for it:

First rule captures the bathroom humidity anytime the light is turned on:

Then I have a rule to turn on the fan. You can ignore the part about the "Master Bath Fan off after 25 min" that's a separate rule that I want to disable when these conditions are met.

Lastly I have a rule that turns the fan back off once the humidity drops:

So how this all works then is the light goes on and the humidity is captured into a global variable (I live on the beach so my ambient humidity tends to vary a bit so this was something I think I needed for my application.)

For the on rule if the humidity climbs more than 3% while the bathroom light is still on I set the global variable to the current humidity and turn on the fan.

For the off rule once the humidity drops 8% from what it was when the fan was turned on I turn the fan off.

Could it be done all in one rule? Probably but it would be messy to read so I broke it into these pieces. Don't if this helps or not and I probably have this way over engineered but it works for me and that's what matters. :smiley:

Thanks a lot for all your explanations tivomaniac! You are exactly right it is not what I want (re-start at any level above 60). I will try to adopt something from your rules in the next days and post once I have it ready.