Help with Rule

Looking for guidance on Rule Machine 4.0. I want to get a notification if a temperature reading stays about a set point for a certain amount of time. E.g.
If the temperature in a room is 72 degrees for more than an hour, send me a notification.


1 Like

Something like.
Temp changed

IF Temp <72
Cancel delayed actions
Exit rule
ELSE-IF Temp >72
Send Notification "notification" to Phone/speaker delay 1 hr cancelable

The above would work, but is there a reason you want to use Rule Machine? Learning it is fine, but if that's not your goal, the built-in Notifications app can do this with only a few clicks--much less effort.

Good luck either way!

EDIT - Just tried this and apparently the "for how long?" setting you need to do this, which is available for some devices like contact sensors, is not available for temperature. Not sure how it's decided where these are available, but RM would definitely work!

  1. What would be the settings in Notifications app for this?
  2. I've tried to use Notifications app before and it often doesn't work right. Rule Machine is more reliable for me.

@bobbles Thanks! I'll give it a try.

Can you send an example of how the rule would look like? I am in the same boat, my rule will be if the temperature is > 42 and stays 30 minutes then send a notification. I have tried several different ways but I can't get it to work. Thank you in advance.

I would still suggest using the Notifications app. If you have tried this approach, what was your setup like, and what didn't work for you?

That being said, a couple Rule Machine features have been added since the above post that would make such a rule easier to write. Here's one way that could:

So I tried the notification app and it almost work the way I want but I want to send a notification only when temperature has been over 47 for more then 30 minutes which it's not what happens using notification I believe, instead it will send a notification after 2 hours as soon as it sensor detects temperature over 47. This gives me a false reading as the sensors are close to the doors so anytime the doors open hot air goes in the coolers making a few degrees hotter but then once doors close temperature comes back to normal. I'll create the rule you suggested and I'll see if that works.
Thank you.

Not quite-- it will send the notification as soon as the event happens and any time it does again, just not more than once every two hours (should another event happen within that time).

It looks like the option I referred to actually isn't available for temperature in Notifier. So, the rule is probably the way to go.