Page 1 of 1

Avoid repeated notifications - snooze script?

Posted: Saturday 04 May 2019 11:57
by doh
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

Re: Avoid repeated notifications - snooze script?  [Solved]

Posted: Saturday 04 May 2019 14:23
by waaren
doh wrote: Saturday 04 May 2019 11:57 .... 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.
Please have a look at this It might be an answer to your requirement.

Re: Avoid repeated notifications - snooze script?

Posted: Saturday 04 May 2019 16:30
by doh
[/quote]
Please have a look at this It might be an answer to your requirement.
[/quote]

That looks perfect! Thank you.