I have the need for help with a RM-4 rule. I have a temp sensor inside of my kitchen freezer and wanted to create a rule to alert me when the temperature started getting too warm. They are the Xiaomi Temperature sensors. Easy enough I thought. So I came up with the following rule:
This morning, I notice that the temperature has not been reporting so I figured the battery was too low. I removed the device and replaced the battery. Upon its coming back to life I immediately started getting alerts that the termperature exceeded the threshold. One right after another. Every time the device reported a temp change my rule fired. And I guess the way the rule is written, it worked as written.
How would I go about limiting the number of notifications or keep from one alert after the other? I could do a greater than and less than a certain temp but if fell outside that range I would not get notified. Should I or could I use a different trigger maybe?
How is everyone else doing this type of rule?
I thought about that but I think I would be in the same boat. Every time the temp "changed" it would still be greater than the threshold until I got it back into the freezer and cooled down. Maybe I don't understand the changed part of a rule trigger.
Will change it to "changed" and see what happens.
Making it CHANGED won't help your problem.
You need to put some logic in to not send an alert as often, or a virtual switch as a 'maintenance over ride flag' to not send them at all (or as you say below, just pause the rule). Many ways to do either of those,
I would turn on the Private Boolean, and then turn it OFF after a period of time. Then use the Private Boolean state as part of the IF statement, or in a new IF statement on the notification action.
I use maintenance switches for some logic, with auto reset after X time. Just depends on how much logic you want to write. 
I guess worse case scenario is pause the rule when changing the battery, let it cool back down, and then unpause the rule.
But then I would need to create a notification to remind me to unpause the rule LOL
I think this would work. Never used a PB before, but I may experiment. The virtual switch sounds doable and I can use it for all of my temperature monitoring rules at once....
You can make the switch fully manual - human turns it on, human turns it off... Or use one of the various Switch with Timer user drivers to auto-reset the switch after a defined period of time.
I use timer switches for all sorts of temporary things I want flipped automatically.
I have some I use as 'dead man' switches/watchdogs to ensure with 100% confidence certain logic is running or a critical device is updating. For those I made a driver that can accept ON commands when already ON then tickle the switch ON to reset the timer and send alert if it reaches zero/times out...
Other timer switches I just as as traditional timers.