Avoid repeated notifications - snooze script?
Posted: Saturday 04 May 2019 11:57
I've used this guide to create some devices that indicate if rain is likely in the coming 1/2/4/6 hours - https://pon.fr/dzvents-darksky-et-probabilite-de-pluie/
It's working great, and I want to use it to add the ability to create a notification if rain is imminent.
That's all fine and I can do that no problem by detecting a change in the 1h device and seeing if it's over a specified percentage and then sending a notification.
What I want to do though is to avoid repeated notifications - e.g. if I've already sent a notification this hour, then don't send another one for the next hour or two.
I guess I could use a data variable to say when the last notification was sent, but is this the best way or is there some trick that I'm missing?
Thanks
It's working great, and I want to use it to add the ability to create a notification if rain is imminent.
That's all fine and I can do that no problem by detecting a change in the 1h device and seeing if it's over a specified percentage and then sending a notification.
What I want to do though is to avoid repeated notifications - e.g. if I've already sent a notification this hour, then don't send another one for the next hour or two.
I guess I could use a data variable to say when the last notification was sent, but is this the best way or is there some trick that I'm missing?
Thanks