Alert Notification just once

As it seems that there is no feature which allows that, i used a workaround with painless scripts.

My goal was to send a notification when a value in the logs is over a specific threshold. But then i got notifications as long as these value was over the threshold. But i just wanted a notification when it's over and then again when it's under the threshold.

With two painless scripts and different time ranges this problem can be solved easily.